(function ($, paw) {

    $.fn.paHostUpgradeNews = function (localization, $hostInput) {
        var com = new paw.com.paNews.PaHostUpgradeNewsComponent($(this), localization);
        com.init();

        var host = $hostInput.val();
        com.fetchHostUpgradeNews(host);
        var domainNameDebouncer = debouncer(function (val) {
            if (val === host) {
                return;
            }
            host = val;
            com.fetchHostUpgradeNews(host);
        }, 500);
        $hostInput.on('input', function () {
            domainNameDebouncer($(this).val());
        });
    };
})(jQuery, paw);