"use strict";var core=require("@gem-sdk/core");const filterStyles=e=>{let o=["--mb","--mb-mobile","--mb-tablet","--d","--d-mobile","--d-tablet"];return o.forEach(o=>{delete e?.[o]}),e},contentSizePaddingSize=e=>core.makeGlobalSize(e?.contentSizePadding),getContainerStyles=(e,o)=>({...filterStyles(e),...contentSizePaddingSize(o).gap,...core.getStyleBackgroundByDevice(e?.backgroundContent),"border-radius":"inherit"}),widthHeightSizeControl=e=>core.makeGlobalSize(e),widthStyle=(e,o,t)=>widthHeightSizeControl(t).width["--w"]?widthHeightSizeControl(t).width:core.makeStyleResponsive("w",core.makeWidth(e,o)),getItemContainerStyles=(e,o)=>{let{borderContent:t,backgroundContent:r,roundedContent:l,accordionShadow:a,width:i,fullWidth:n,widthHeightSize:c,iconColor:g,color:S,textColor:d,hasActiveShadow:s}=e??{};return{"--text-hover-color":o?core.getSingleColorVariable(d?.active??d?.normal):core.getSingleColorVariable(d?.hover??d?.normal),"--icon-expand-hover-color":o?core.getSingleColorVariable(S?.active??S?.normal):core.getSingleColorVariable(S?.hover??S?.normal),"--icon-expand-active-color":core.getSingleColorVariable(S?.active??S?.normal),"--icon-active-color":core.getSingleColorVariable(g?.active??g?.normal),"--icon-hover-color":o?core.getSingleColorVariable(g?.active??g?.normal):core.getSingleColorVariable(g?.hover??g?.normal),...widthStyle(i,n,c),...core.makeStyle({bs:t?.border??t?.border,bw:t?.width??t?.width,bc:core.getSingleColorVariable(t?.color??t?.color)}),...core.makeStyleResponsive("bg",r),...core.getStyleShadow({value:a,styleAppliedFor:"box-shadow",isEnableShadow:a?.enable||s}),...core.getRadiusStyleActiveState({...l,active:{...l||{},radiusType:"custom"}})}},headerContentPaddingSize=e=>core.makeGlobalSize(e),composePosition=e=>core.makeStyle({fd:"left"===e?"row":"row-reverse",jc:"right"===e?"space-between":""}),getDropdownStyles=(e,o)=>{let{headerContentPadding:t,widthHeightSize:r,itemHeaderSpacing:l,bgColor:a,headerBorder:i}=e??{},{isShow:n,iconPosition:c}=o??{};return{...t&&headerContentPaddingSize(t).padding,...l?.type||t?{}:core.composeSize(l?.custom),...widthHeightSizeControl(r).height,...composePosition(c),...n?core.makeStyle({bgc:core.getSingleColorVariable(a?.active??a?.normal),bs:i?.active?.border??i?.normal?.border,bw:i?.active?.width??i?.normal?.width,bc:core.getSingleColorVariable(i?.active?.color??i?.normal?.color)}):{...core.getGlobalColorStateStyle("bgc",a),...core.handleConvertBorderStyle(i),...core.handleConvertBorderWidth(i),...core.handleConvertBorderColor(i),...core.getGlobalColorStateStyle("bgc",a)}}},getDropdownTextStyles=(e,o)=>({...o?core.makeStyle({c:core.getSingleColorVariable(e?.active??e?.normal)}):core.makeStyle({c:core.getSingleColorVariable(e?.normal)})}),getIconRotateStyles=(e,o,t)=>{let{color:r}=e??{};return{...core.makeStyle({c:core.getSingleColorVariable(o?r?.active??r?.normal??"transparent":r?.normal??"transparent")}),width:`${t??16}px`,height:`${t??16}px`}},composeIconGlobalSize=e=>core.makeGlobalSize(e),getGapStyles=(e,o)=>({...composeIconGlobalSize(e).gap,...core.makeStyleResponsive("jc",o)}),getIconStyles=(e,o)=>{let t=o?`${o}px`:"16px";return{...e,width:t,height:t,"--height":t}},getTemplateRow=e=>({"grid-template-rows":`${+!!e}fr`}),getRenderChildrenStyles=()=>({"grid-template-columns":"minmax(auto, 100%)"}),getIconGlobalSize=e=>core.makeGlobalSize(e)?.padding;exports.getContainerStyles=getContainerStyles,exports.getDropdownStyles=getDropdownStyles,exports.getDropdownTextStyles=getDropdownTextStyles,exports.getGapStyles=getGapStyles,exports.getIconGlobalSize=getIconGlobalSize,exports.getIconRotateStyles=getIconRotateStyles,exports.getIconStyles=getIconStyles,exports.getItemContainerStyles=getItemContainerStyles,exports.getRenderChildrenStyles=getRenderChildrenStyles,exports.getTemplateRow=getTemplateRow;
