Liferay.Loader.define("@liferay/address-web@1.0.16/js/CountryRegionDynamicSelect",["module","exports","require","frontend-js-web","liferay!frontend-js-react-web$prop-types"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r("frontend-js-web"),i=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(r("liferay!frontend-js-react-web$prop-types"));function CountryRegionDynamicSelect({countrySelect:e,countrySelectVal:t=0,regionSelect:r,regionSelectVal:i=0}){let l;new Liferay.DynamicSelect([{select:e,selectData(e){(0,n.getCountries)((t=>{const r=t.find((e=>"JP"===e.a2));l=r.countryId,e(t)}))},selectDesc:"nameCurrentValue",selectId:"countryId",selectSort:!0,selectVal:t},{select:r,selectData(e,t){(0,n.getRegions)((r=>{t===l&&"ja_JP"===Liferay.ThemeDisplay.getLanguageId()&&r.sort(((e,t)=>Number(e.regionCode)>Number(t.regionCode)?1:Number(e.regionCode)<Number(t.regionCode)?-1:0)),e(r)}),t)},selectDesc:"title",selectDisableOnEmpty:!0,selectId:"regionId",selectVal:i}])}CountryRegionDynamicSelect.prototypes={countrySelect:i.default.string.isRequired,countrySelectId:i.default.string.isRequired,countrySelectVal:i.default.string,regionSelect:i.default.string.isRequired,regionSelectId:i.default.string.isRequired,regionSelectVal:i.default.string};var l=CountryRegionDynamicSelect;t.default=l}}));
//# sourceMappingURL=CountryRegionDynamicSelect.js.map