{"version":3,"file":"useSetVariant.CAN7KdEL.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/MXAlwEF2Ne69R0dSh1Po/PBkk6PatjLnl9iNIEarO/country_lists_territories.js","https:/framerusercontent.com/modules/1zkMrPbH88cE7j7n0485/ntkH3fuXZ0eNsAuupIwp/useSetVariant.js"],"sourcesContent":["export const territoryCountriesAuNz=[\"AU\",\"NZ\"];export const territoryCountriesUsCaMx=[\"US\",\"CA\",\"MX\"];export const territoryCountriesUkIe=[\"GB\",\"IE\"];export const territoryCountriesUk=[\"GB\"];export const territoryCountriesEu=[\"AT\",\"BE\",\"BG\",\"HR\",\"CY\",\"CZ\",\"DK\",\"EE\",\"FI\",\"FR\",\"DE\",\"GR\",\"HU\",\"IE\",\"IT\",\"LV\",\"LT\",\"LU\",\"MT\",\"NL\",\"PL\",\"PT\",\"RO\",\"SK\",\"SI\",\"ES\",\"SE\"];\nexport const __FramerMetadata__ = {\"exports\":{\"territoryCountriesUkIe\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"territoryCountriesAuNz\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"territoryCountriesEu\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"territoryCountriesUk\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"territoryCountriesUsCaMx\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./country_lists_territories.map","import{jsx as _jsx}from\"react/jsx-runtime\";import{useEffect,useState}from\"react\";import{store_Country}from\"https://framerusercontent.com/modules/uEbYfRswpEkLoguEXuyc/aJGVne8id8ZJMOpoLekR/store_Country.js\";import{store_ProductPropsStore}from\"https://framerusercontent.com/modules/XlGHH84z4WYiDTmjfihj/KlxXdvbNgPflbcSBUeRA/store_ProductPropsStore.js\";import{territoryCountriesAuNz,territoryCountriesEu}from\"https://framerusercontent.com/modules/MXAlwEF2Ne69R0dSh1Po/PBkk6PatjLnl9iNIEarO/country_lists_territories.js\";function setVariantForMadeIn(Component,isProductPage=false){return props=>{const[country,_c]=store_Country();const[store,_s]=store_ProductPropsStore();let variant=\"Not Set\";try{const countryCode=(country?.countryCode||\"\").toUpperCase();if(isProductPage&&store.productFormat===\"Jewelry\"){// Only show in Ireland for now\nif(countryCode===\"IE\"){variant=\"IE\";}}else{if(countryCode===\"US\"){variant=\"US\";}else if(countryCode===\"GB\"){variant=\"UK\";}else if(territoryCountriesEu.includes(countryCode)){variant=\"EU\";}else if(territoryCountriesAuNz.includes(countryCode)){variant=\"AU\";}else{variant=\"Not Set\";}}}catch(e){}return /*#__PURE__*/_jsx(Component,{...props,variant:variant});};}export function setVariantForMadeInProductPage(Component){return setVariantForMadeIn(Component,true);}export function setVariantForMadeInHomepage(Component){return setVariantForMadeIn(Component,false);}export function setVariantForCreateOptions(Component){return props=>{const[store,_s]=store_ProductPropsStore();let variant=\"Original\";try{if((store.tnsExperimentSd||\"\").toLowerCase().includes(\"updated\")){variant=\"Updated\";}}catch(e){}return /*#__PURE__*/_jsx(Component,{...props,variant:variant});};}export function setVariantForPrintImagePanel(Component){return props=>{const[store,setStore]=store_ProductPropsStore();const[variant,setVariant]=useState(\"\");useEffect(()=>{const experimentVarientActive=store.tnsExperimentSd.includes(\"updated\");const isPrint=store.productFormat===\"Print\";const showVariant=experimentVarientActive&&isPrint;if(showVariant){setVariant(\"Updated\");}else{setVariant(\"Original\");}},[store.productFormat,store.tnsExperimentSd]);return /*#__PURE__*/_jsx(Component,{...props,variant:variant});};}\nexport const __FramerMetadata__ = {\"exports\":{\"setVariantForPrintImagePanel\":{\"type\":\"reactHoc\",\"name\":\"setVariantForPrintImagePanel\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"setVariantForCreateOptions\":{\"type\":\"reactHoc\",\"name\":\"setVariantForCreateOptions\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"setVariantForMadeInProductPage\":{\"type\":\"reactHoc\",\"name\":\"setVariantForMadeInProductPage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"setVariantForMadeInHomepage\":{\"type\":\"reactHoc\",\"name\":\"setVariantForMadeInHomepage\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}"],"mappings":"0MAAa,EAAuB,CAAC,KAAK,KAAK,CAA8J,EAAqB,6FAAwI,ICAyJ,SAAS,EAAoB,EAAU,EAAc,GAAM,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAQ,GAAI,GAAe,CAAM,CAAC,EAAM,GAAI,GAAyB,CAAK,EAAQ,UAAU,GAAG,CAAC,IAAM,GAAa,GAAS,aAAa,IAAI,aAAa,CAAI,GAAe,EAAM,gBAAgB,UACpxB,IAAc,OAAM,EAAQ,MAAsO,EAAvN,IAAc,KAAc,KAAc,IAAc,KAAc,KAAc,EAAqB,SAAS,EAAY,CAAU,KAAc,EAAuB,SAAS,EAAY,CAAU,KAAmB,eAAqB,EAAE,OAAoB,EAAK,EAAU,CAAC,GAAG,EAAc,UAAQ,CAAC,EAA0G,SAAgB,EAA4B,EAAU,CAAC,OAAO,EAAoB,EAAU,GAAM,CAA8S,SAAgB,EAA6B,EAAU,CAAC,MAAO,IAAO,CAAC,GAAK,CAAC,EAAM,GAAU,GAAyB,CAAM,CAAC,EAAQ,GAAYA,EAAS,GAAG,CAA0S,OAAzS,MAAc,CAAC,IAAM,EAAwB,EAAM,gBAAgB,SAAS,UAAU,CAAO,EAAQ,EAAM,gBAAgB,QAA2E,EAAjD,GAAyB,EAAmC,UAA4B,WAAW,EAAI,CAAC,EAAM,cAAc,EAAM,gBAAgB,CAAC,CAAqB,EAAK,EAAU,CAAC,GAAG,EAAc,UAAQ,CAAC,mBADtzC,IAAsC,IAA4H,IAAgJ,IAAsK"}