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