function loadScript(e,t){var a,n;n=!1,(a=document.createElement("script")).type="text/javascript",a.src=e,a.onload=a.onreadystatechange=function(){n||this.readyState&&"complete"!=this.readyState||(n=!0,t())},document.getElementsByTagName("head")[0].appendChild(a)}function loadCss(e){var t=document.createElement("link");t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("href",e),document.getElementsByTagName("head")[0].appendChild(t)}
// Cargar CSS
var cssPath = '/prontus/front/prontusPush/style.min.css';
var customCssPath = '%%snp_app_custom_css%%';

if (customCssPath != '') cssPath = customCssPath;

loadCss(cssPath);
loadScript('/prontus/front/prontusPush/prontusPushNotification.min.js', function () {
    prontusPushNotification.install({
        appServerPublicKey: '%%snp_app_server_key%%',
        subscribeContainerId: 'prontus-subscribe-container',
        subscribeButtonText: '%%snp_app_boxmsg_button_subscribe%%',
        unsubscribeButtonText: '%%snp_app_boxmsg_button_unsubscribe%%',
        subscribeInvitationText: '%%snp_app_boxmsg_subscribe_invitation%%',
        subscribedText: '%%snp_app_boxmsg_subscribed%%',
        notificationDeniedText: '%%snp_app_boxmsg_notification_denied%%',
        notSupported: '%%snp_app_boxmsg_not_supported%%',
        modalIconImg: '%%snp_app_modal_icon_img%%',
        modalBodyText: '%%snp_app_modal_body_text%%',
        modalButtonAllowText: '%%snp_app_modal_button_accept%%',
        modalButtonCancelText: '%%snp_app_modal_button_cancel%%',
        appServer: '%%api_server_wrapper%%',
        prontusId: '%%_prontus_id%%',
        modalShowDelay: %%snp_app_modal_delay%%,
        showOnLoad: %%snp_app_modal_show%%
    });
});
