"use strict";var helpers=require("../../../common/helpers.js"),core=require("@gem-sdk/core");const composeStyles=e=>helpers.filterTruthy(e),composeContainerStyles=(e,o)=>{let{pos:t,d:r,op:s,right:p,top:c,left:l,bottom:n,z:i,padding:g,margin:a}=e??{},y=e?.["spacing-setting"],m=core.composeAdvanceStyle({pos:t,d:r,op:s,right:p,top:c,left:l,bottom:n,z:i,margin:a,padding:g,"spacing-setting":y});return composeStyles({...m,...core.makeStyleResponsive("ta",o?.align)})},composeFormDropdownStyles=(e,o,t)=>{let{border:r,rounded:s,hasBoxShadow:p,boxShadow:c}=e??{},{background:l,size:n}=o??{},{globalSize:i,backgroundColorV2Active:g}=t??{},a=core.composeAdvanceStyle({border:r,rounded:s,hasBoxShadow:p,boxShadow:c}),y=core.makeGlobalSize(i);return composeStyles({...y?.width?.["--w"]?y.width:{"--w":"100%"},...y?.height?.["--h"]?y.height:{"--h":"auto"},...y.padding,...a,...n?.type?{}:core.composeSize(n?.custom),appearance:"none",...core.getStyleBackgroundByDevice(l,{ignoreBackgroundImageProperties:!0}),"--bgi":getBgImageUrl(l?.desktop?.color),"background-repeat":"no-repeat","background-position":"right 10px center, 0 0","--focus-bgi":getBgImageUrl(g?.active)})},getBgImageUrl=e=>`url(https://cdn.shopify.com/s/files/1/1827/4239/t/1/assets/ico-select.svg?v=155563818344741998551488860031) ${e?.includes("linear-gradient")?","+e:""}`,getAppendTypoStyleFirstTime=e=>{let o=core.composeTypographyStyle(e?.typo,e?.typography);return composeStyles({...o,...!Number(e?.defaultOption)&&{"--c":e?.placeholderColor}})},getStyleOption=e=>{let{typography:o,typo:t}=e??{},r=core.composeTypographyStyle(t,o);return composeStyles({...r})};exports.composeContainerStyles=composeContainerStyles,exports.composeFormDropdownStyles=composeFormDropdownStyles,exports.getAppendTypoStyleFirstTime=getAppendTypoStyleFirstTime,exports.getStyleOption=getStyleOption;
