"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[109],{16:(e,o,n)=>{n.d(o,{a:()=>t});const t={accordion:"fmJEoApf",noTopBorder:"Vkp0_3He",section:"ZJCsmW3Z",toggle:"NM_YOWAF",labelAccordian:"gMfWhlvk",sectionHeading:"UXHjrgo4",arrow:"iVRau9iH",content:"Yn9kwIny",contentWithGap:"QZ6IQcPi",iconCaret:"UgDfblcC"}},314:(e,o,n)=>{var t=n(0),r=n(4),c=n(1),s=n(16),a=n(62),i=n(85);function d({shouldRemoveTopBorder:e,reverseProductAccordions:o,apps:{product:n}}){var r;const c=n.product.value,s=n.selectedVariant.value,a=(0,i.a)(c,s),d=null!==(r=null==a?void 0:a.accordianFromFields)&&void 0!==r?r:null==c?void 0:c.accordianFromFields,u=d&&o?Object.fromEntries(Object.entries(d).reverse()):d;return(0,t.jsx)(l,{sections:u,shouldRemoveTopBorder:e})}function l({sections:e,shouldRemoveTopBorder:o}){const[n,i]=(0,c.useState)({});if((0,c.useEffect)((()=>{if(!e)return;const o={};Object.keys(e).forEach((e=>{e in n||(o[e]=!1)})),Object.keys(o).length>0&&i((e=>Object.assign(Object.assign({},e),o)))}),[e]),!e)return(0,t.jsx)(r.Fragment,{});const d=o?`${s.a.accordion} ${s.a.noTopBorder}`:s.a.accordion;return(0,t.jsx)("div",{className:d,children:Object.entries(e).map((([e,o])=>{const r=n[e]||!1;return(0,t.jsxs)("div",{class:s.a.section,children:[(0,t.jsx)("input",{type:"checkbox",id:`section-toggle-${e}`,class:s.a.toggle,checked:r,onChange:()=>{return o=e,void i((e=>Object.assign(Object.assign({},e),{[o]:!e[o]})));var o}}),(0,t.jsxs)("label",{htmlFor:`section-toggle-${e}`,class:s.a.labelAccordian,children:[e,(0,t.jsx)("span",{class:s.a.arrow,children:(0,t.jsx)(a.a,{})})]}),(0,t.jsx)("ul",{class:s.a.content,children:o.map((e=>(0,t.jsx)("li",{dangerouslySetInnerHTML:{__html:e}})))})]},e)}))})}var u=n(2),p=n(13);const v=[p.a];u.BentoUI.feature({featureId:"product_hero_accordion_from_fields",variations:[u.BentoUI.variation({component:d,hydrate:!0,variationId:"default",apps:v,render(e){return o=this,n=arguments,r=function*({context:e}){return{props:{shouldRemoveTopBorder:!0,reverseProductAccordions:"enabled"==e.getAssignment("reverseProductAccordions")}}},new((t=void 0)||(t=Promise))((function(e,c){function s(e){try{i(r.next(e))}catch(e){c(e)}}function a(e){try{i(r.throw(e))}catch(e){c(e)}}function i(o){var n;o.done?e(o.value):(n=o.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,a)}i((r=r.apply(o,n||[])).next())}));var o,n,t,r}})]}),(0,u.createEntrypoint)("product_hero_accordion_from_fields",d,v)},70:(e,o,n)=>{function t(){}function r(){return()=>{}}function c(e){const o={};for(const n of Object.keys(e.actions))o[n]=o=>({type:`${e.namespace}:${n}`,payload:o});const n=e.serverActions?new Set(Object.keys(e.serverActions)):void 0;return{namespace:e.namespace,version:e.version,selectors:e.selectors,actions:o,serverActions:n,__serverActionTypes:void 0,__stateType:void 0}}n.d(o,{a:()=>r,b:()=>c,c:()=>t})}},e=>{e.O(0,[1,9,10,19,28],(()=>e(e.s=314))),e.O()}]);