"use strict";var e=require("@gem-sdk/core"),t=require("../../utils/mappingVariantStyles.js"),a=require("../common.js"),r=require("./const.js");exports.getDropdownGroupData=a=>{let{styles:r,setting:s}=a,{dropdownItemWidth:l}=r??{},o=t.mappingVariantStyles(s?.variantPresets,r),i={...s,variantPresets:o};return{...r,...i,swatchAutoWidth:(()=>{let t={};return e.DEVICES.forEach(e=>{t[e]=l?.[e]==="fill"}),t})()}},exports.getTextVariantTitleData=(t,s,l)=>{let{styles:o,setting:i}=t,{layout:n}=i??{},{labelGap:p}=o??{},{optionName:u,hasPreSelected:m,isChangeVariant:y,selectedOptions:c,styleOptionSelected:g}=l??{},T=e.composeTypographyClassName(o?.labelTypo,o?.labelTypography);return{className:e.cls(T,"Liquid"===s?"{{showVariantClass}}":""),styles:{typo:o?.labelTypo},style:{...a.makeStyleGapForLabel(n,p)},setting:{htmlTag:"legend",text:"Liquid"===s?"{{option.name}}":`${u}${(!1!=m||y)&&"dropdown"!==g?`: ${c?.[u]}`:""}`,tagWidth:(t=>{let a=Object.fromEntries(e.DEVICES.map(a=>[r.VAR_WIDTH_BY_DEVICE[a],"horizontal"===e.getResponsiveValueByScreen(t,a)?r.HORIZONTAL_WIDTH:r.DEFAULT_WIDTH_LABEL]));return a})(n),excludeFlex:!0}}};
