import{Pd as e,ai as t,di as n,fi as r,gi as i,qr as a,ri as o,vr as s,zd as c}from"./index-Q5R6-AeA.js";var l=c(e()),u=(0,l.createContext)({padding:0}),d=u.Provider,f=()=>(0,l.useContext)(u).padding,p=o((e,{padding:t,withBorder:i,inheritPadding:a})=>{let o=n({size:t,sizes:e.spacing}),s=`calc(-1 * ${o})`,c=e.colorScheme===`dark`?e.colors.dark[4]:e.colors.gray[3];return{cardSection:{display:`block`,marginLeft:s,marginRight:s,paddingLeft:a?o:void 0,paddingRight:a?o:void 0,borderTop:i?`${r(1)} solid ${c}`:void 0,borderBottom:i?`${r(1)} solid ${c}`:void 0,"& + &":{borderTop:0},"&[data-first]":{marginTop:s,borderTop:0,borderBottom:i?`${r(1)} solid ${c}`:void 0},"&[data-last]":{marginBottom:s,borderBottom:0}}}}),m=Object.defineProperty,h=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,v=(e,t,n)=>t in e?m(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,y=(e,t)=>{for(var n in t||={})g.call(t,n)&&v(e,n,t[n]);if(h)for(var n of h(t))_.call(t,n)&&v(e,n,t[n]);return e},b=(e,t)=>{var n={};for(var r in e)g.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&h)for(var r of h(e))t.indexOf(r)<0&&_.call(e,r)&&(n[r]=e[r]);return n},x={withBorder:!1,inheritPadding:!1},S=(0,l.forwardRef)((e,n)=>{let r=t(`CardSection`,x,e),{className:i,withBorder:o,inheritPadding:s,unstyled:c,variant:u}=r,d=b(r,[`className`,`withBorder`,`inheritPadding`,`unstyled`,`variant`]),{classes:m,cx:h}=p({padding:f(),withBorder:o,inheritPadding:s},{name:`Card`,unstyled:c,variant:u});return l.createElement(a,y({className:h(m.cardSection,i),ref:n},d))});S.displayName=`@mantine/core/CardSection`;var C=i(S),w=o(e=>({root:{position:`relative`,overflow:`hidden`,backgroundColor:e.colorScheme===`dark`?e.colors.dark[6]:e.white}})),T=Object.defineProperty,E=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,k=(e,t,n)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,A=(e,t)=>{for(var n in t||={})D.call(t,n)&&k(e,n,t[n]);if(E)for(var n of E(t))O.call(t,n)&&k(e,n,t[n]);return e},j=(e,t)=>{var n={};for(var r in e)D.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&E)for(var r of E(e))t.indexOf(r)<0&&O.call(e,r)&&(n[r]=e[r]);return n},M={padding:`md`},N=(0,l.forwardRef)((e,n)=>{let r=t(`Card`,M,e),{className:i,padding:a,radius:o,children:c,unstyled:u,variant:f}=r,p=j(r,[`className`,`padding`,`radius`,`children`,`unstyled`,`variant`]),{classes:m,cx:h}=w(null,{name:`Card`,unstyled:u,variant:f}),g=l.Children.toArray(c),_=g.map((e,t)=>typeof e==`object`&&e&&`type`in e&&e.type===C?(0,l.cloneElement)(e,{variant:f,padding:a,"data-first":t===0||void 0,"data-last":t===g.length-1||void 0}):e);return l.createElement(d,{value:{padding:a}},l.createElement(s,A({className:h(m.root,i),radius:o,p:a,ref:n},p),_))});N.Section=C,N.displayName=`@mantine/core/Card`;var P=i(N);export{P as t};