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