import{i as e}from"./chunk-aKtaBQYM.js";import{C as t,H as n,K as r,L as i,U as a,Vt as o,W as s,dt as c,ft as l,q as u,t as d,tt as f,ut as p,w as m,wt as h}from"./mui-B6lh3XSP.js";import{l as g}from"./IconButton-BEBOUWhl.js";import{t as _}from"./TextField-DOdnjCrL.js";import{O as v,i as y,yt as b}from"./index-KVuxnkWj.js";var x=e(o(),1);function S(e){return c(`MuiFab`,e)}var C=p(`MuiFab`,[`root`,`primary`,`secondary`,`extended`,`circular`,`focusVisible`,`disabled`,`colorInherit`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`info`,`error`,`warning`,`success`]),w=h(),T=e=>{let{color:t,variant:r,classes:i,size:a}=e,o=f({root:[`root`,r,`size${n(a)}`,t===`inherit`?`colorInherit`:t]},S,i);return{...i,...o}},E=r(m,{name:`MuiFab`,slot:`Root`,shouldForwardProp:e=>u(e)||e===`classes`,overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`size${n(r.size)}`],r.color===`inherit`&&t.colorInherit,t[n(r.size)],t[r.color]]}})(s(({theme:e})=>({...e.typography.button,minHeight:36,...i(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),borderRadius:`50%`,padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.grey[900]:e.palette.getContrastText?.(e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:`none`},[`&.${C.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:`small`},style:{width:40,height:40}},{props:{size:`medium`},style:{width:48,height:48}},{props:{variant:`extended`},style:{borderRadius:48/2,padding:`0 16px`,width:`auto`,minHeight:`auto`,minWidth:48,height:48}},{props:{variant:`extended`,size:`small`},style:{width:`auto`,padding:`0 8px`,borderRadius:34/2,minWidth:34,height:34}},{props:{variant:`extended`,size:`medium`},style:{width:`auto`,padding:`0 16px`,borderRadius:40/2,minWidth:40,height:40}},{props:{color:`inherit`},style:{color:`inherit`}}]})),s(({theme:e})=>({variants:[...Object.entries(e.palette).filter(t([`dark`,`contrastText`])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),s(({theme:e})=>({[`&.${C.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),D=x.forwardRef(function(e,t){let n=a({props:e,name:`MuiFab`}),{children:r,className:i,color:o=`default`,component:s=`button`,disabled:c=!1,disableFocusRipple:u=!1,focusVisibleClassName:d,size:f=`large`,variant:p=`circular`,...m}=n,h={...n,color:o,component:s,disabled:c,disableFocusRipple:u,size:f,variant:p},g=T(h),{root:_,...v}=g;return(0,w.jsx)(E,{className:l(g.root,i),component:s,internalNativeButton:!0,disabled:c,focusRipple:!u,focusVisibleClassName:l(g.focusVisible,d),ownerState:h,ref:t,...m,classes:v,children:r})}),O=d()(e=>({fab:{position:`fixed`,bottom:e.spacing(2),right:e.spacing(2),[e.breakpoints.down(`md`)]:{bottom:`calc(${e.dimensions.bottomBarHeight}px + ${e.spacing(2)})`}}})),k=({editPath:e,disabled:t})=>{let{classes:n}=O(),r=g();return!v(`readonly`)&&!t?(0,w.jsx)(`div`,{className:n.fab,children:(0,w.jsx)(D,{size:`medium`,color:`primary`,onClick:()=>r(e),children:(0,w.jsx)(y,{})})}):``},A=d()(e=>({header:{position:`sticky`,left:0,display:`flex`,flexDirection:`column`,alignItems:`stretch`,padding:e.spacing(3,2,2)}})),j=({keyword:e,setKeyword:t})=>{let{classes:n}=A(),r=b(),[i,a]=(0,x.useState)(e),o=(0,x.useRef)();return(0,x.useEffect)(()=>(o.current=setTimeout(()=>t(i),500),()=>clearTimeout(o.current)),[i,t]),(0,w.jsx)(`div`,{className:n.header,children:(0,w.jsx)(_,{variant:`outlined`,placeholder:r(`sharedSearch`),value:i,onChange:e=>a(e.target.value)})})};export{k as n,j as t};