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