import{makeStyleResponsive as e,makeWidth as t,makeStyle as r,getSingleColorVariable as o,composeTypographyStyle as s,getStyleShadow as l,genVariable as n,getShortName as a,composeTypographyV2 as p}from"@gem-sdk/core";import{convertSizeToWidth as g}from"./helpers.js";let getProgressBarStyles=(s,l)=>{let n;let{progressBarHeight:a,color:p}=s??{},{remainingPercentage:g}=l??{};return a&&(n=Object.fromEntries(Object.entries(a).map(([e,t])=>[e,Number((t+"").replace("px",""))]))),{...e("h",t(n),"px"),...r({bg:"linear-gradient(90deg, #eee 50%, transparent 50%)",bgc:o(p),bgp:`${parseInt(String(g||0))}% center`})}},getContainerStyles=s=>{let{width:l,textColor:n}=s??{};return{...e("w",t(l)),...r({c:o(n)})}},getWrapperStyles=t=>{let{alignment:r}=t??{};return{...e("jc",r)}},getIconStyles=(e,t,s)=>{let{iconColor:l,oosIconColor:n}=e??{};return{...r({c:o(s?n:l)}),...getIconSize(e,t)}},getTextStyles=(e,t)=>{let{typo:r,oosTextColor:o}=e??{},n={...r,attrs:{...r?.attrs,color:t?o:r?.attrs?.color}},a=s(n,e?.typography);return{...a,...l({value:r?.custom?.textShadow,styleAppliedFor:"text-shadow",isEnableShadow:r?.custom?.hasShadowText})}};function getIconSize(o,s){let{typo:l}=o??{},{iconSize:c}=s??{};if(c?.desktop)return{...e("w",t(c),"px")};let i=l&&!l.custom?n(a(`typography-${l.type}-fontSize`)):void 0,S=l&&l.custom?g(p(l.custom)):{};return i?r({w:i}):S}export{getContainerStyles,getIconStyles,getProgressBarStyles,getTextStyles,getWrapperStyles};
