import { appSetting, indentifySetting } from '@/plugins/setting';

/** @returns {StateApp} */
export const state = () => {
  const extensionInfo = {
    notify: {
      uuid: '',
      is_show: false,
      title: '',
      content: '',
    },
    ...appSetting.extensionInfo.get(),
  };

  const platformShopConfig = {
    shopee: {},
    lazada: {},
    tiktok: {},
    ...appSetting.platformShopConfig.get(),
  };

  const indentify = {
    appId: indentifySetting.appUuid.get(),
    profileId: indentifySetting.profileId.get(),
    agent: indentifySetting.browserAgent.get(),
    browser: indentifySetting.browserName.get(),
    ip: indentifySetting.browserIp.get(),
    platform: indentifySetting.browserPlatform.get(),
    fingerprint: indentifySetting.fingerprintId.get(),
  };

  return {
    menuActive: '',
    loading: false,
    url: '',
    extensionInfo,
    platformShopConfig,
    indentify,
    title: '',
  };
};
