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