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