"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[85],{7:(e,o,c)=>{c.d(o,{a:()=>n});const n={accordion:"fmJEoApf",noTopBorder:"Vkp0_3He",section:"ZJCsmW3Z",toggle:"NM_YOWAF",labelAccordian:"gMfWhlvk",arrow:"iVRau9iH",content:"Yn9kwIny",iconCaret:"UgDfblcC"}},196:(e,o,c)=>{var n=c(0),s=c(4),r=c(2),t=c(7),a=c(3),i=c(24);function l({sections:e,shouldRemoveTopBorder:o}){const[c,a]=(0,r.useState)({});if((0,r.useEffect)((()=>{if(!e)return;const o={};Object.keys(e).forEach((e=>{e in c||(o[e]=!1)})),Object.keys(o).length>0&&a((e=>Object.assign(Object.assign({},e),o)))}),[e]),!e)return(0,n.jsx)(s.Fragment,{});const l=o?`${t.a.accordion} ${t.a.noTopBorder}`:t.a.accordion;return(0,n.jsx)("div",{className:l,children:Object.entries(e).map((([e,o])=>{const s=c[e]||!1;return(0,n.jsxs)("div",{class:t.a.section,children:[(0,n.jsx)("input",{type:"checkbox",id:`section-toggle-${e}`,class:t.a.toggle,checked:s,onChange:()=>{return o=e,void a((e=>Object.assign(Object.assign({},e),{[o]:!e[o]})));var o}}),(0,n.jsxs)("label",{htmlFor:`section-toggle-${e}`,class:t.a.labelAccordian,children:[e,(0,n.jsx)("span",{class:t.a.arrow,children:(0,n.jsx)(i.a,{})})]}),(0,n.jsx)("ul",{class:t.a.content,children:o.map((e=>(0,n.jsx)("li",{dangerouslySetInnerHTML:{__html:e}})))})]},e)}))})}(0,c(1).createEntrypoint)("product_hero_accordion_from_fields",(function({shouldRemoveTopBorder:e}){var o;const{product:c,selectedVariant:s}=(0,a.c)((e=>({product:e.product,selectedVariant:e.selectedVariant}))),r=null!==(o=null==s?void 0:s.accordianFromFields)&&void 0!==o?o:null==c?void 0:c.accordianFromFields;return(0,n.jsx)(l,{sections:r,shouldRemoveTopBorder:e})}))}},e=>{e.O(0,[1,2,3,4,6,5,7],(()=>e(e.s=196))),e.O()}]);