import{makeStyleResponsive as t,getResponsiveStyleShadowWithoutState as e,composeRadiusResponsive as r,composeBorderResponsive as o,getGlobalColorResponsiveStyle as n,composeTypographyStyle as l,getGlobalColorStateStyle as a,handleConvertBorderColor as b,handleConvertBorderWidth as i,handleConvertBorderStyle as p,getStyleShadow as s,makeStyle as d,filterHoverVariables as m,composeRadius as u,makeStyleState as h}from"@gem-sdk/core";let c=t=>Object.fromEntries(Object.entries(t).map(([t,e])=>[t,`${e}px`])),w=t=>{if(!t)return t;let e=t.split(" ").map(t=>t.trim());return 4===e.length?`${e[0]} ${e[3]} ${e[2]} ${e[1]}`:t},f=t=>{if(!t)return t;let e={...t},r=e.btlr,o=e.bblr,n=e.btrr,l=e.bbrr;return e.btrr=o,e.bbrr=r,e.btlr=l,e.bblr=n,e},y=t=>{if(!t)return t;let e={...t};return e.width&&(e.width=w(e.width)),e},g=(t,e)=>{if(!t||!e)return{};let r=c(t),o={...h("brw",r),...h("blw",r)};return o},j=t=>{if(!t)return{};let e={...t,normal:t?.normal??"transparent"},r={...a("brc",e),...a("blc",e)},o=Object.fromEntries(Object.entries(r).filter(([t,e])=>void 0!==e));return o},O=t=>{let{styles:e,setting:o}=t,{inputBackgroundColor:n,textColor:u,dividerColor:h,dividerStroke:c}=e??{},{enableHoverInput:w,hasButton:f}=o??{},y=l(e?.typo,e?.typography),O={...g(c,h),...j(h)},S={...a("bg",{...n,normal:n?.normal??"transparent"}),...a("c",{...u,hover:u?.hover??u?.normal}),...f?O:{}},x=e?.inputBorder,k={...p(x),...i(x),...b(x)},E={...f?{}:k,...f?{}:r(e?.shapeRounded),...d({}),...y,...S,...s({value:e?.typo?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:e?.typo?.custom?.hasShadowText})};return w?E:m(E)},S=({borderBtn:e,buttonWidth:r,buttonBackgroundColor:o,iconColor:n,corner:l,flipStyle:s,enableHoverButton:d})=>{let h=s?Object.fromEntries(Object.entries(e||{}).map(([t,e])=>[t,y(e)])):e,c=s?Object.fromEntries(Object.entries(l||{}).map(([t,e])=>[t,f(e)])):l,w={...t("w",r),...p(h),...i(h),...b(h),...a("bg",o),...a("c",n),...u(c)};return d?w:m(w)},x=({inputHeight:e,align:r})=>({...t("h",e),...t("jc",r)}),k=({backgroundColor:l,styles:a})=>{let b=a?.shapeShadow,i=e(b,"box-shadow",{desktop:b?.desktop??{},tablet:b?.tablet??b?.desktop??{},mobile:b?.mobile??b?.tablet??b?.desktop??{}});return{...n("bg",l),...t("maxw",a?.quantityWidth),...o(a?.shapeBorder),...r(a?.shapeRounded),...i}};export{S as getButtonStyle,x as getContainerStyles,O as getInputStyle,k as getWrapperStyles};
