"use strict";(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["AdminSettingPricingCountryCode-admin"],{CLI3:function(e,a,o){o.r(a);var l=o("oYSA"),n=o("qZpH"),u=o("ALIA"),t=o("16zp");a.default=function(){var e,a,o,r,d,i,s,p,c=React,v=c.useContext,y=(c.useEffect,wp.components.SelectControl),g=v(u.Z),C=(0,l.Z)(g,2),E=C[0],T=C[1],S=(0,n.iv)("width:165px;.components-input-control__container{padding-left:35px;background-image:url(",null===(e=E.selectedCountry)||void 0===e||null===(a=e.value)||void 0===a?void 0:a.flag,");background-size:22px 26px;background-repeat:no-repeat;background-position:10px center;};label:countryCSS;");return(0,n.tZ)(y,{disabled:!shopwp.misc.isPro,css:!(null===(o=E.selectedCountry)||void 0===o||null===(r=o.value)||void 0===r||!r.flag)&&S,label:wp.i18n.__("Country","shopwp"),options:(0,t.uF)(E.availableTranslations),value:null!==(d=E.selectedCountry)&&void 0!==d&&null!==(i=d.value)&&void 0!==i&&i.isoCode?null===(s=E.selectedCountry)||void 0===s||null===(p=s.value)||void 0===p?void 0:p.isoCode:"US",onChange:function(e){var a=(0,t.Ds)(E.availableTranslations,e);a||console.warning("ShopWP Error: No country found by ISO code",a),T({type:"SET_SELECTED_COUNTRY",payload:a[0]}),T({type:"UPDATE_SETTING",payload:{key:"countryCode",value:a[0].value.isoCode}}),T({type:"UPDATE_SETTING",payload:{key:"currencyCode",value:a[0].value.currency.isoCode}}),T({type:"UPDATE_SETTING",payload:{key:"currencySymbol",value:a[0].value.currency.symbol}});var o=function(e){return!!e.length&&e[0].value.availableLanguages.filter((function(e){return e.isoCode===E.selectedLanguage.value}))}(a);o.length?(T({type:"SET_SELECTED_LANGUAGE",payload:E.selectedLanguage}),T({type:"UPDATE_SETTING",payload:{key:"languageCode",value:E.selectedLanguage.value.toLowerCase()}})):(T({type:"SET_SELECTED_LANGUAGE",payload:a[0].value.availableLanguages[0]}),T({type:"UPDATE_SETTING",payload:{key:"languageCode",value:a[0].value.availableLanguages[0].isoCode.toLowerCase()}}))}})}}}]);