import { Q as instance, c as configStore } from './utils-D7fMfZeY.js';
import { T as setDayjsLocale, U as setDayjsTimeZone } from './quick-message-Dd37W-T_.js';

function setupLanguage(lang) {
    if (instance.language !== lang) {
        instance.changeLanguage(lang);
    }
    configStore.set('language', lang);
    setDayjsLocale(lang);
}
function setupTheme(theme) {
    configStore.set('theme', theme);
}
function setupBusinessId(businessId) {
    configStore.set('businessId', businessId || null);
}
function setupShopId(shopId) {
    configStore.set('shopId', shopId || null);
}
function setupAccessToken(accessToken) {
    configStore.set('accessToken', accessToken || null);
}
function setupIsProduction(isProduction) {
    let value = false;
    if (typeof isProduction === 'boolean') {
        value = isProduction;
    }
    else if (typeof isProduction === 'string') {
        value = isProduction.toLowerCase() === 'true';
    }
    configStore.set('isProduction', value);
}
function setupTimeZone(timeZone) {
    let _timeZone = timeZone;
    if (!timeZone || timeZone === 'null') {
        _timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
    }
    configStore.set('timeZone', _timeZone);
    if (_timeZone) {
        setDayjsTimeZone(_timeZone);
    }
}
function setupTranslationSettings(translationSettings) {
    configStore.set('translationSettings', translationSettings);
}
function setupIsNotConnected(isNotConnected) {
    let value = false;
    if (typeof isNotConnected === 'boolean') {
        value = isNotConnected;
    }
    else if (typeof isNotConnected === 'string') {
        value = isNotConnected.toLowerCase() === 'true';
    }
    configStore.set('isNotConnected', value);
}
function setupIsZwiz(isZwiz) {
    let value = false;
    if (typeof isZwiz === 'boolean') {
        value = isZwiz;
    }
    else if (typeof isZwiz === 'string') {
        value = isZwiz.toLowerCase() === 'true';
    }
    configStore.set('isZwiz', value);
}
function setupConnectionList(connectionList) {
    configStore.set('connectionList', connectionList);
}
function setupMemberList(memberList) {
    configStore.set('memberList', memberList);
}
function setupZrmzApiUrl(zrmzApiUrl) {
    configStore.set('zrmzApiUrl', zrmzApiUrl);
}
function setupOpenChatByFilter(openChatByFilter) {
    configStore.set('openChatByFilter', openChatByFilter);
}
function setupPackage(_package) {
    configStore.set('package', _package);
}
function setupIsShowWarningNotification(isShowWarning) {
    let value = false;
    if (isShowWarning === undefined)
        return;
    if (typeof isShowWarning === 'boolean') {
        value = isShowWarning;
    }
    else if (typeof isShowWarning === 'string') {
        value = isShowWarning.toLowerCase() === 'true';
    }
    configStore.set('isShowWarningNotification', value);
}
function setupZwizSyncMessage(zwizSyncMessage) {
    let value = false;
    if (zwizSyncMessage === undefined)
        return;
    if (typeof zwizSyncMessage === 'boolean') {
        value = zwizSyncMessage;
    }
    else if (typeof zwizSyncMessage === 'string') {
        value = zwizSyncMessage.toLowerCase() === 'true';
    }
    configStore.set('zwizSyncMessage', value);
}

export { setupTheme as a, setupBusinessId as b, setupShopId as c, setupAccessToken as d, setupIsProduction as e, setupTimeZone as f, setupTranslationSettings as g, setupIsNotConnected as h, setupIsZwiz as i, setupConnectionList as j, setupMemberList as k, setupZrmzApiUrl as l, setupOpenChatByFilter as m, setupPackage as n, setupIsShowWarningNotification as o, setupZwizSyncMessage as p, setupLanguage as s };
