"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../text/components/Text.liquid.js"),s=require("../common/helpers.js"),a=require("@gem-sdk/system"),l=require("../common/classes.js"),r=require("../common/styles.js");exports.default=n=>{let{parentUid:i,childrenIcon:o,rawChildren:d,index:c,builderProps:p,title:y}=n,{iconSvg:g,titleTypo:$,layoutHeader:C,iconGlobalSize:S,iconCollapseSize:v,iconCollapse:m,iconExpand:u,alignment:x,configIconSize:I,iconPosition:h}=s.getParentSettings(n.parentSetting)??{},{isShow:f,composeContentSizeStyle:q,collapsibleIcon:D,composeIconColor:w,makeIcon:R}=s.getSettingItemLiquid(n),_=a.createClass(l.getItemContainerClasses),j=a.createClass(l.getDropdownClasses(n.parentStyle,{isShow:f,uniqueId:i,makeIcon:R,index:c})),L=a.createStyle(r.getIconGlobalSize(S)),M=a.createClass(l.getIconClasses),T=a.createClass(l.getIconRotateClasses(n.parentStyle,{isShow:f,iconExpand:u,iconSvg:g,iconCollapse:m})),b=a.createClass(l.getContentClasses(i)),G=a.createClass(l.getGapClasses),N=a.createStyle(r.getItemContainerStyles(n.parentStyle,!1)),k=a.createStyle(r.getDropdownStyles(n.parentStyle,{isShow:f,iconPosition:h})),F=a.createStyle(r.getDropdownTextStyles(n.parentStyle?.textColor,f)),H=a.createStyle(r.getIconRotateStyles(n.parentStyle,f,v)),O=a.createStyle(r.getGapStyles(S,x)),P=a.createClass(e.composeClasses("gp-inline-flex")),z=a.createClass(f?{...e.composeClasses("!gp-text-[var(--icon-active-color)]"),...l.getLayoutIconClasses}:l.getLayoutIconClasses),B=a.createStyle(r.getIconStyles(w,I)),E=a.createClass(l.getRenderChildrenClasses(n.parentStyle,{isShow:f,hasTransitionedIn:!1,isMounted:!1})),U=a.createStyle({...r.getTemplateRow(f),...r.getRenderChildrenStyles()}),V=a.createClass(e.composeClasses("gp-accordion-item_body-inner gp-transition-all gp-duration-500 gp-min-h-0"));return e.template`
  <div class="${_}" style="${N}">
    <div data-index="${c?.toString()}" class="${b}">
      <div aria-hidden uid="${p?.uid}" id="${p?.uid}" data-index="${c?.toString()}"
        class="${j}" style="${k}">
        ${a.If(!!D,e.template`
          <div class="${M}">
            <span style="${H}"
            data-index="${c}"
            class="${T}">
              ${D}
            </span>
          </div>
          `)}
        <div class="${G}" style="${O}">
          ${a.If("before-text"===C,e.template`
          <div class="${P}" style="${{...L}}">
            <span
              class="${z}"
              style="${B}">
              ${o??""}</span>
          </div>
          `)}
          ${t.default({style:{...F},styles:{typo:$},setting:{htmlTag:"div",text:y,excludeFlex:!0,isForceValue:!0},className:"gp-overflow-hidden gp-accordion-text-content group-hover:[color:var(--text-hover-color)!important]"})}
          ${a.If("after-text"===C,e.template`
          <div class="${P}" style="${{...L}}">
            <span
              class="${z}"
              style="${B}">
              ${o??""}</span>
          </div>
          `)}
        </div>
      </div>
      <div data-index="${c}" data-show="${f}" class="${E}" style="${U}">
        <div data-index="${c}" class="${V}" style="${q()}">
          ${d&&d.length>=s.MINIMUM_CHILD?e.RenderChildren({...d[s.BODY_CHILD_INDEX]}):""}
        </div>
      </div>
    </div>
  </div>
  `};
