1"use strict";(globalThis.webpackChunkthe_ismaili||=[]).push([[8231],{73770(e,t,a){a.r(t),a.d(t,{default:()=>d});var n=a(65043);var s=a(70214),i=a(45948),l=a(70579);const d=function(e){var t,a,d,c;let{contents:o,colors:r}=e;const u=(0,n.useRef)([]),v=(0,n.useRef)(null),[h,b]=(0,n.useState)(null===(t=o[0])||void 0===t?void 0:t.heading),[m,f]=(0,n.useState)(null===(a=o[0])||void 0===a?void 0:a.heading),[x,p]=(0,n.useState)(null===(d=o[0])||void 0===d?void 0:d.contents),[j,N]=(0,n.useState)(null===(c=o[0])||void 0===c?void 0:c.content_buttons),[g,y]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{const e=u.current[o.findIndex(e=>e.heading===h)];e&&v.current&&(v.current.style.width=`${e.offsetWidth}px`,v.current.style.left=`${e.offsetLeft}px`)},[h,o]),(0,l.jsx)("div",{className:"tab-block-container py-30",style:(0,s.v7)(r),children:(0,l.jsxs)("div",{className:"container",children:[(0,l.jsx)("div",{className:"tab-header-wrapper",children:(0,l.jsxs)("div",{className:"tab-header",children:[o.map((e,t)=>(0,l.jsx)("button",{ref:e=>u.current[t]=e,className:"tab-button "+(h===e.heading?"active":""),onClick:()=>((e,t)=>{e!==h&&(b(e),y(!0),setTimeout(()=>{f(e),p(t.contents),N(t.content_buttons),y(!1)},500))})(e.heading,e),children:e.heading},e.heading)),(0,l.jsx)("div",{className:"tab-indicator",ref:v})]})}),(0,l.jsx)("div",{className:"tab-content-wrapper",children:(0,l.jsx)("div",{className:"tab-content "+(g?"fade-leave-active":"fade-enter-active"),children:x.map((e,t)=>(0,l.jsxs)("div",{className:"tab-section",children:[(0,l.jsx)("h2",{className:"tab-title",children:null===e||void 0===e?void 0:e.heading}),(0,l.jsx)(i.A,{html:null===e||void 0===e?void 0:e.body,primaryColor:null===r||void 0===r?void 0:r.primary_color,className:"tab-body rich-text--on-dark"}),j.map((e,t)=>(0,l.jsx)("button",{className:"tab-cta",children:null===e||void 0===e?void 0:e.label},t))]},t))},m)})]})})}}}]); 2//# sourceMappingURL=block-tabbed-text-block.73299b3a.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.