import{j as C}from"./jsx-runtime-D_zvdyIk.js";import{a as h}from"./chunk-QMGIS6GS-CBZUm-7V.js";import{p as S,h as P,B as N,i as _,o as b,m as w}from"./polymorphic-factory-EW0USS3V.js";import{P as B}from"./Paper-k397c_lM.js";import{c as E}from"./create-safe-context-CzEsa9t0.js";const[R,A]=E("Card component was not found in tree");var f={root:"m_e615b15f",section:"m_599a2148"};const F={},a=S((e,t)=>{const o=P("CardSection",F,e),{classNames:n,className:c,style:i,styles:d,vars:p,withBorder:m,inheritPadding:l,mod:v,...y}=o,r=A();return C.jsx(N,{ref:t,mod:[{"with-border":m,"inherit-padding":l},v],...r.getStyles("section",{className:c,style:i,styles:d,classNames:n}),...y})});a.classes=f;a.displayName="@mantine/core/CardSection";const V={},$=b((e,{padding:t})=>({root:{"--card-padding":w(t)}})),u=S((e,t)=>{const o=P("Card",V,e),{classNames:n,className:c,style:i,styles:d,unstyled:p,vars:m,children:l,padding:v,...y}=o,r=_({name:"Card",props:o,classes:f,className:c,style:i,classNames:n,styles:d,unstyled:p,vars:m,varsResolver:$}),x=h.Children.toArray(l),j=x.map((s,g)=>typeof s=="object"&&s&&"type"in s&&s.type===a?h.cloneElement(s,{"data-first-section":g===0||void 0,"data-last-section":g===x.length-1||void 0}):s);return C.jsx(R,{value:{getStyles:r},children:C.jsx(B,{ref:t,unstyled:p,...r("root"),...y,children:j})})});u.classes=f;u.displayName="@mantine/core/Card";u.Section=a;export{u as C};
