import{a_ as P,a$ as b,aZ as k,ag as r,r as y,b0 as C,ae as _,b1 as z,at as B,j as N,b4 as R,aq as I}from"./index-7722cded.js";function U(e){return P("MuiDivider",e)}b("MuiDivider",["root","horizontal","vertical","insetContext","insetNone"]);const j=["className","children","component","inset","orientation","role","slots","slotProps"],E=e=>{const{orientation:i,inset:t}=e,o={root:["root",i,t&&`inset${R(t)}`]};return I(o,U,{})},$=k("hr",{name:"JoyDivider",slot:"Root",overridesResolver:(e,i)=>i.root})(({theme:e,ownerState:i})=>r({"--Divider-thickness":"1px","--Divider-lineColor":e.vars.palette.divider},i.inset==="none"&&{"--_Divider-inset":"0px"},i.inset==="context"&&{"--_Divider-inset":"var(--Divider-inset, 0px)"},{margin:"initial",marginInline:i.orientation==="vertical"?"initial":"var(--_Divider-inset)",marginBlock:i.orientation==="vertical"?"var(--_Divider-inset)":"initial",position:"relative",alignSelf:"stretch",flexShrink:0},i.children?r({"--Divider-gap":e.spacing(1),"--Divider-childPosition":"50%",display:"flex",flexDirection:i.orientation==="vertical"?"column":"row",alignItems:"center",whiteSpace:"nowrap",textAlign:"center",border:0},e.typography["body-sm"],{"&::before, &::after":{position:"relative",inlineSize:i.orientation==="vertical"?"var(--Divider-thickness)":"initial",blockSize:i.orientation==="vertical"?"initial":"var(--Divider-thickness)",backgroundColor:"var(--Divider-lineColor)",content:'""'},"&::before":{marginInlineEnd:i.orientation==="vertical"?"initial":"min(var(--Divider-childPosition) * 999, var(--Divider-gap))",marginBlockEnd:i.orientation==="vertical"?"min(var(--Divider-childPosition) * 999, var(--Divider-gap))":"initial",flexBasis:"var(--Divider-childPosition)"},"&::after":{marginInlineStart:i.orientation==="vertical"?"initial":"min((100% - var(--Divider-childPosition)) * 999, var(--Divider-gap))",marginBlockStart:i.orientation==="vertical"?"min((100% - var(--Divider-childPosition)) * 999, var(--Divider-gap))":"initial",flexBasis:"calc(100% - var(--Divider-childPosition))"}}):{border:"none",listStyle:"none",backgroundColor:"var(--Divider-lineColor)",inlineSize:i.orientation==="vertical"?"var(--Divider-thickness)":"initial",blockSize:i.orientation==="vertical"?"initial":"var(--Divider-thickness)"})),v=y.forwardRef(function(i,t){const o=C({props:i,name:"JoyDivider"}),{className:d,children:a,component:n=a!=null?"div":"hr",inset:p,orientation:l="horizontal",role:s=n!=="hr"?"separator":void 0,slots:D={},slotProps:h={}}=o,m=_(o,j),c=r({},o,{inset:p,role:s,orientation:l,component:n}),g=E(c),u=r({},m,{component:n,slots:D,slotProps:h}),[x,f]=z("root",{ref:t,className:B(g.root,d),elementType:$,externalForwardedProps:u,ownerState:c,additionalProps:r({as:n,role:s},s==="separator"&&l==="vertical"&&{"aria-orientation":"vertical"})});return N(x,r({},f,{children:a}))});v.muiName="Divider";const M=v;export{M as D};
