import { storage } from '@wxt-dev/storage';

// --- User ---
export const storageUserId = storage.defineItem('local:user_id', {
  fallback: '',
});

export const storageUserName = storage.defineItem('local:user_name', {
  fallback: '',
});

export const storageUserToken = storage.defineItem('local:user_token', {
  fallback: '',
});

export const storageUserPlan = storage.defineItem('local:user_extension_plan', {
  fallback: 'Free',
});

// --- Identity ---
export const storageAppUuid = storage.defineItem('local:indentify_app_uuid', {
  fallback: '',
});

export const storageProfileId = storage.defineItem('local:indentify_profile_id', {
  fallback: '',
});

export const storageBrowserIp = storage.defineItem('local:indentify_browser_ip', {
  fallback: '',
});

export const storageBrowserName = storage.defineItem('local:indentify_browser_name', {
  fallback: '',
});

// --- App ---
export const storageBetaMode = storage.defineItem('local:beta_mode', {
  fallback: false,
});

export const storageUseShopManager = storage.defineItem('local:use_shopmanager', {
  fallback: false,
});

export const storageToggleMenu = storage.defineItem('local:toggle_menu', {
  fallback: false,
});

export const storageExtensionInfo = storage.defineItem('local:config_extension_data', {
  fallback: {},
  version: 1,
});

export const storagePlatformShopConfig = storage.defineItem('local:config_platform_shop_data', {
  fallback: { shopee: {}, lazada: {}, tiktok: {} },
  version: 1,
});

// --- Shopee ---
export const storageShopeeShopId = storage.defineItem('local:shopee_shop_id', {
  fallback: '',
});

export const storageShopeeShopName = storage.defineItem('local:shopee_shop_name', {
  fallback: '',
});

export const storageShopeeConfigProduct = storage.defineItem('local:shopee_config_product_v2', {
  fallback: {
    spyDetail: true,
    spySearch: true,
    spyAds: true,
    showShopName: false,
    addCloneBtn: false,
  },
  version: 1,
});

// --- TikTok ---
export const storageTiktokShopId = storage.defineItem('local:tiktok_shop_id', {
  fallback: '',
});

export const storageTiktokShopName = storage.defineItem('local:tiktok_shop_name', {
  fallback: '',
});

// --- Lazada ---
export const storageLazadaShopId = storage.defineItem('local:lazada_shop_id', {
  fallback: '',
});

export const storageLazadaShopName = storage.defineItem('local:lazada_shop_name', {
  fallback: '',
});
