"use strict";const a=require("react/jsx-runtime"),e=require("react"),H=require("@chakra-ui/react"),v=require("@chakra-ui/react/styled-system"),j=require("./stack-CIN13EDn.cjs.js"),d=require("./extract-style-props-B4hqila-.cjs.js"),{withProvider:q,withContext:P}=H.createSlotRecipeContext({key:"card"}),h=q("div","root"),N=P("div","header"),$=P("div","content"),l=e.createContext(void 0),i=({ref:o,children:s,...t})=>{const r=v.useSlotRecipe({key:"card"}),[n,c]=r.splitVariantProps(t),[y,S]=d.extractStyleProps(c),[R,p]=e.useState(null),[f,x]=e.useState(null),m=e.useMemo(()=>({setHeader:p,setContent:x}),[p,x]);return a.jsx(l.Provider,{value:m,children:a.jsxs(h,{ref:o,...n,...y,...S,children:[a.jsxs(j.Stack,{direction:"column",gap:"200",children:[R,f]}),s]})})};i.displayName="Card.Root";const u=({children:o,...s})=>{const t=e.useContext(l),[r,n]=d.extractStyleProps(s);return e.useEffect(()=>{if(t){const c=a.jsx(N,{...r,...n,children:o});return t.setHeader(c),()=>t.setHeader(null)}},[o,r,n,t]),null};u.displayName="Card.Header";const C=({children:o,...s})=>{const t=e.useContext(l),[r,n]=d.extractStyleProps(s);return e.useEffect(()=>{if(t){const c=a.jsx($,{...r,...n,children:o});return t.setContent(c),()=>t.setContent(null)}},[o,r,n,t]),null};C.displayName="Card.Content";const k={Root:i,Header:u,Content:C};exports.Card=k;exports.CardContent=C;exports.CardHeader=u;exports.CardRoot=i;
//# sourceMappingURL=card-Bk3xHlo2.cjs.js.map
