import{i as e}from"./chunk-aKtaBQYM.js";import{C as t,Ft as n,H as r,R as i,U as a,V as o,Y as s,at as c,it as l,ot as u,t as d,vt as f,w as p,z as m}from"./mui-BgU4WrXF.js";import{l as h}from"./IconButton-oialqkv3.js";import{t as g}from"./TextField-DctlzLY-.js";import{A as _,i as v,pt as y}from"./index-bel1r0Sr.js";var b=e(n(),1);function x(e){return c(`MuiFab`,e)}var S=l(`MuiFab`,[`root`,`primary`,`secondary`,`extended`,`circular`,`focusVisible`,`disabled`,`colorInherit`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`info`,`error`,`warning`,`success`]),C=f(),w=e=>{let{color:t,variant:n,classes:r,size:i}=e,a=s({root:[`root`,n,`size${o(i)}`,t===`inherit`?`colorInherit`:t]},x,r);return{...r,...a}},T=r(p,{name:`MuiFab`,slot:`Root`,shouldForwardProp:e=>a(e)||e===`classes`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${o(n.size)}`],n.color===`inherit`&&t.colorInherit,t[o(n.size)],t[n.color]]}})(m(({theme:e})=>({...e.typography.button,minHeight:36,transition:e.transitions.create([`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`},[`&.${S.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`}}]})),m(({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}}}}))]})),m(({theme:e})=>({[`&.${S.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),E=b.forwardRef(function(e,t){let n=i({props:e,name:`MuiFab`}),{children:r,className:a,color:o=`default`,component:s=`button`,disabled:c=!1,disableFocusRipple:l=!1,focusVisibleClassName:d,size:f=`large`,variant:p=`circular`,...m}=n,h={...n,color:o,component:s,disabled:c,disableFocusRipple:l,size:f,variant:p},g=w(h),{root:_,...v}=g;return(0,C.jsx)(T,{className:u(g.root,a),component:s,internalNativeButton:!0,disabled:c,focusRipple:!l,focusVisibleClassName:u(g.focusVisible,d),ownerState:h,ref:t,...m,classes:v,children:r})}),D=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)})`}}})),O=({editPath:e,disabled:t})=>{let{classes:n}=D(),r=h();return!_(`readonly`)&&!t?(0,C.jsx)(`div`,{className:n.fab,children:(0,C.jsx)(E,{size:`medium`,color:`primary`,onClick:()=>r(e),children:(0,C.jsx)(v,{})})}):``},k=d()(e=>({header:{position:`sticky`,left:0,display:`flex`,flexDirection:`column`,alignItems:`stretch`,padding:e.spacing(3,2,2)}})),A=({keyword:e,setKeyword:t})=>{let{classes:n}=k(),r=y(),[i,a]=(0,b.useState)(e),o=(0,b.useRef)();return(0,b.useEffect)(()=>(o.current=setTimeout(()=>t(i),500),()=>clearTimeout(o.current)),[i,t]),(0,C.jsx)(`div`,{className:n.header,children:(0,C.jsx)(g,{variant:`outlined`,placeholder:r(`sharedSearch`),value:i,onChange:e=>a(e.target.value)})})};export{O as n,A as t};