import{j as a}from"./jsx-runtime-Dfk2JFgj.js";import{r as u}from"./index-CWN_QRa1.js";import{c as b}from"./index-DllfNvuz.js";import{g as w,a as I,u as T,_ as z,b as c,c as F,d as p,e as J,s as y,f as R,k as E}from"./DefaultPropsProvider-BPu7lNPC.js";function X(e){return w("MuiCircularProgress",e)}const Y=I("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]),L=["className","color","disableShrink","size","style","thickness","value","variant"];let g=e=>e,j,D,_,$;const i=44,U=E(j||(j=g`
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
`)),K=E(D||(D=g`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }

  100% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -125px;
  }
`)),V=e=>{const{classes:r,variant:s,color:t,disableShrink:o}=e,n={root:["root",s,`color${p(t)}`],svg:["svg"],circle:["circle",`circle${p(s)}`,o&&"circleDisableShrink"]};return J(n,X,r)},W=y("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:s}=e;return[r.root,r[s.variant],r[`color${p(s.color)}`]]}})(({ownerState:e,theme:r})=>c({display:"inline-block"},e.variant==="determinate"&&{transition:r.transitions.create("transform")},e.color!=="inherit"&&{color:(r.vars||r).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&R(_||(_=g`
      animation: ${0} 1.4s linear infinite;
    `),U)),A=y("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,r)=>r.svg})({display:"block"}),B=y("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,r)=>{const{ownerState:s}=e;return[r.circle,r[`circle${p(s.variant)}`],s.disableShrink&&r.circleDisableShrink]}})(({ownerState:e,theme:r})=>c({stroke:"currentColor"},e.variant==="determinate"&&{transition:r.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&R($||($=g`
      animation: ${0} 1.4s ease-in-out infinite;
    `),K)),N=u.forwardRef(function(r,s){const t=T({props:r,name:"MuiCircularProgress"}),{className:o,color:n="primary",disableShrink:l=!1,size:f=40,style:M,thickness:d=3.6,value:h=0,variant:k="indeterminate"}=t,q=z(t,L),m=c({},t,{color:n,disableShrink:l,size:f,thickness:d,value:h,variant:k}),x=V(m),v={},C={},S={};if(k==="determinate"){const P=2*Math.PI*((i-d)/2);v.strokeDasharray=P.toFixed(3),S["aria-valuenow"]=Math.round(h),v.strokeDashoffset=`${((100-h)/100*P).toFixed(3)}px`,C.transform="rotate(-90deg)"}return a.jsx(W,c({className:F(x.root,o),style:c({width:f,height:f},C,M),ownerState:m,ref:s,role:"progressbar"},S,q,{children:a.jsx(A,{className:x.svg,ownerState:m,viewBox:`${i/2} ${i/2} ${i} ${i}`,children:a.jsx(B,{className:x.circle,style:v,ownerState:m,cx:i,cy:i,r:(i-d)/2,fill:"none",strokeWidth:d})})}))}),G=({overlay:e,show:r=!0,full:s,size:t,style:o,className:n,children:l})=>a.jsxs(u.Fragment,{children:[r&&!e&&a.jsxs(u.Fragment,{children:[a.jsx("div",{style:{...o},className:b("",s&&"gtc-rc-loading-container",e&&"gtc-rc-loading-container gtc-rc-loading-overlay",n),children:a.jsx(N,{className:"gtc-rc-loading-spinner",size:t||40})}),e&&!s&&l]}),e&&a.jsxs(u.Fragment,{children:[r&&a.jsx("div",{style:{...o},className:b("",e&&"gtc-rc-loading-container gtc-rc-loading-overlay",n),children:a.jsx(N,{className:"gtc-rc-loading-spinner",size:t||40})}),e&&!s&&l]})]});G.__docgenInfo={description:"",methods:[],displayName:"Loading",props:{overlay:{required:!1,tsType:{name:"boolean"},description:"If true, the circular loading is rendered over all components with a translucent background"},show:{required:!1,tsType:{name:"boolean"},description:"If true, the circular loading is rendered",defaultValue:{value:"true",computed:!1}},full:{required:!1,tsType:{name:"boolean"},description:"If true, the circular loading is rendered over all components"},size:{required:!1,tsType:{name:"number"},description:"Defines the size of the circular loading"},style:{required:!1,tsType:{name:"ReactCSSProperties",raw:"React.CSSProperties"},description:"adds aditional style to loading"},className:{required:!1,tsType:{name:"string"},description:""},children:{required:!1,tsType:{name:"union",raw:"JSX.Element | JSX.Element[]",elements:[{name:"JSX.Element"},{name:"Array",elements:[{name:"JSX.Element"}],raw:"JSX.Element[]"}]},description:""}}};export{N as C,G as L,Y as c,X as g};
