(function ($) {
    window.booklyStaffSpecialDays = function (Options) {
        let $container = $('.' + Options.form_id),
            options = {
                csrf_token: BooklySCSpecialDaysL10n.csrfToken,
                container: '.bookly-js-staff-cabinet-special-days-wrap',
                staff_id: Options.staff_id,
                saving: function (alerts) {
                    $.each(alerts, function (type, messages) {
                        if (messages.length > 0) {
                            window.booklyNativeAlert(messages.join('\n'));
                        }
                    });
                },
                booklyAlert: function (alerts) {
                    options.saving(alerts);
                },
                l10n: BooklySCSpecialDaysL10n
            };
        // Init Staff Days Off.
        new BooklyStaffSpecialDays($container, options);
    };
})(jQuery);