"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),e=require("../../src/modules/TextBlockAnimated/textBlockAnimated.module.css"),i=require("gsap"),c=require("../../node_modules/.pnpm/gsap@3.13.0/node_modules/gsap/SplitText.cjs.js"),u=require("../../node_modules/.pnpm/gsap@3.13.0/node_modules/gsap/ScrollTrigger.cjs.js"),p=require("@gsap/react"),d=require("react"),g=require("../../utils/cn/cn.cjs.js"),a=require("../../components/Typography/Typography.cjs.js");i.registerPlugin(c.SplitText,u.ScrollTrigger);function m({label:s,body:n,colorScheme:o}){const t=d.useRef(null);return p.useGSAP(()=>{c.SplitText.create(t.current,{type:"words chars",className:e.bodyText,autoSplit:!0,onSplit:l=>i.from(l.chars,{stagger:2,opacity:.3,duration:1,scrollTrigger:{trigger:t.current,start:"top 70%",end:"top 30%",scrub:!0,markers:!1}})})},{scope:t}),r.jsx("div",{className:g.cn(e.root,e[o]),children:r.jsxs("div",{className:e.container,children:[s&&r.jsx(a.Typography,{as:"p",defaultVariant:"labelMd",mobileVariant:"labelSm",emphasis:!0,className:e.label,children:s}),r.jsxs(a.Typography,{as:"div",defaultVariant:"displayMd",mobileVariant:"headingMd",className:e.body,children:[s&&r.jsx("span",{className:e.spacer,children:" "}),r.jsx("p",{className:e.bodyText,ref:t,children:n})]})]})})}exports.TextBlockAnimated=m;
