"use strict";var DesignSystem;(globalThis.webpackChunkDesignSystem=globalThis.webpackChunkDesignSystem||[]).push([[646],{3947:(e,n,t)=>{t.d(n,{l:()=>d});var c=t(4184),o=t.n(c),i=t(8083),a=t(7320);const d=e=>{let{ariaHidden:n,className:t,children:c,description:d,id:s,inversed:r,title:l,viewBox:h,...v}=e;const u=o()("ds-c-icon",{"ds-c-icon--inverse":r},t),m=(0,i.Z)("icon--",s),p=`${m}__title`,b=`${m}__desc`,_=d?`${p} ${b}`:p,g=!n,N={};return g&&(N["aria-labelledby"]=_,N.role="img"),(0,a.BX)("svg",{"aria-hidden":n,className:u,id:s??g?m:void 0,viewBox:h,xmlns:"http://www.w3.org/2000/svg",...N,...v,children:[g&&(0,a.tZ)("title",{id:p,children:l}),g&&d&&(0,a.tZ)("desc",{id:b,children:d}),c]})};d.defaultProps={ariaHidden:!0,inversed:!1}},3595:(e,n,t)=>{t.r(n);var c=t(6652),o=t(4184),i=t.n(o),a=t(7320);const d=e=>{let{bordered:n,children:t,className:c}=e;const o=i()("ds-c-accordion",n&&"ds-c-accordion--bordered",c);return(0,a.tZ)("div",{className:o,children:t})};(0,c.O)("ds-accordion",(()=>d),{attributes:["class-name","bordered"]});var s=t(8661),r=t(2082),l=t(3947);const h={className:"",viewBox:"0 0 24 24"},v={className:"",viewBox:"3 3 18 18"};var u=t(8083);const m=e=>{let{buttonClassName:n,children:t,contentClassName:c,defaultOpen:o,heading:d,headingLevel:r,id:l,isControlledOpen:h,onChange:v,closeIconComponent:m,openIconComponent:p}=e;const b=i()("ds-c-accordion__content",c),_=i()("ds-c-accordion__button",n),g=`h${r}`,N=(0,u.Z)("accordion-item--",l),Z=`${N}__button`,f=void 0!==h,[C,w]=(0,s.eJ)(f?h:o),$=f?h:C,B=m,y=p,H=(0,a.tZ)(B,{className:"ds-c-accordion__button-icon",id:`${N}__icon`}),O=(0,a.tZ)(y,{className:"ds-c-accordion__button-icon",id:`${N}__icon`});if(d)return(0,a.BX)(a.HY,{children:[(0,a.tZ)(g,{className:"ds-c-accordion__heading",children:(0,a.BX)("button",{className:_,"aria-expanded":$,"aria-controls":N,id:Z,onClick:e=>{v?.(e),f||w(!C)},type:"button",children:[d,$?H:O]})}),(0,a.tZ)("div",{className:b,id:N,hidden:f?!h:!C,children:t})]})};m.defaultProps={defaultOpen:!1,headingLevel:"2",closeIconComponent:function(e){const n=`ds-c-icon--remove ${e.className||""}`;return(0,a.tZ)(l.l,{title:(0,r.t)("icons.remove"),...h,...e,className:n,children:(0,a.tZ)("path",{d:"M19 13H5v-2h14v2z"})})},openIconComponent:function(e){const n=`ds-c-icon--add ${e.className||""}`;return(0,a.tZ)(l.l,{title:(0,r.t)("icons.add"),...v,...e,className:n,children:(0,a.tZ)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})}};var p=t(2021);const b=e=>{let{defaultOpen:n,contentId:t,...c}=e;return(0,a.tZ)(m,{...c,defaultOpen:(0,p.Mt)(n),id:t})};(0,c.O)("ds-accordion-item",(()=>b),{attributes:["button-class-name","content-class-name","content-id","default-open","heading","heading-level"],events:["onChange"]})},2021:(e,n,t)=>{function c(e){return void 0!==e&&"false"!==e}function o(e){return e?new Date(e):void 0}function i(e){if(void 0!==e)return parseInt(e)}t.d(n,{Mt:()=>c,Py:()=>o,bD:()=>i})},7320:(e,n,t)=>{t.d(n,{BX:()=>c.BX,HY:()=>c.HY,tZ:()=>c.tZ}),t(8661);var c=t(6584)}},e=>{var n=(3595,e(e.s=3595));DesignSystem=n}]);
//# sourceMappingURL=ds-accordion.js.map