"use strict";(self.webpackChunkshopwp=self.webpackChunkshopwp||[]).push([["TranslatorCountries-public"],{JiU1:function(e,t,r){r.r(t),r.d(t,{default:function(){return s}});var a=r("8fid"),n=r("LpH3"),o=r("toZP"),u=r("V+k2"),i=r("Qu7M");function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){(0,a.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l={name:"crvxfl-TranslatorCSS",styles:"width:250px;max-width:100%;margin:0 5px;label:TranslatorCSS;"},s=function(e){var t=e.translatorState,r=e.translatorDispatch,a=(0,u.h)(),p=((0,i.O)(),l),s={option:function(e,t){return c(c({},e),{},{paddingLeft:60,backgroundImage:"url("+t.value.flag+")",backgroundSize:"35px 26px",backgroundRepeat:"no-repeat",backgroundPosition:"10px center"})},singleValue:function(e,t){return c(c({},e),{},{paddingLeft:33,backgroundImage:"url("+t.data.value.flag+")",backgroundSize:"25px 26px",backgroundRepeat:"no-repeat",backgroundPosition:"0px center"})}};return(0,n.tZ)(o.ZP,{styles:s,css:p,onChange:function(e){var n,o;e&&(r({type:"SET_SELECTED_COUNTRY",payload:e}),a({type:"SET_COUNTRY",payload:e.value.isoCode}),a({type:"SET_CURRENCY",payload:e.value.currency.isoCode}),(n=e.value.availableLanguages,!!(o=t).selectedLanguage&&n.filter((function(e){return e.isoCode===o.selectedLanguage.value.isoCode}))).length||r({type:"SET_SELECTED_LANGUAGE",payload:!1}))},options:t.availableTranslations,value:t.selectedCountry,placeholder:!!t.isLoading&&wp.i18n.__("Loading ... ","shopwp")})}}}]);