import{r as M,c as i,a,s as r,b as C,f as g,e as j,o as s,F as H,j as L,i as S,z as B,t as m,C as A,M as T,n as d}from"./app-DtilF0jd.js";const V={key:0,class:"px-3 py-1.5 text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 rounded-lg shadow-lg whitespace-nowrap"},D=["onClick"],E=["innerHTML"],F=["disabled"],N=["innerHTML"],$={key:0,class:"ml-2 font-semibold"},I={__name:"FloatingActionButton",props:{icon:{type:String,default:"plus"},label:{type:String,default:""},extended:{type:Boolean,default:!1},position:{type:String,default:"bottom-right"},color:{type:String,default:"indigo"},size:{type:String,default:"md"},actions:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:b}){const n=e,v=b,t=M(!1),p=()=>{n.actions.length>0?t.value=!t.value:v("click")},f=o=>{o.action&&o.action(),t.value=!1},k=i(()=>({"bottom-right":"right-4 bottom-20 md:bottom-6","bottom-left":"left-4 bottom-20 md:bottom-6","bottom-center":"left-1/2 -translate-x-1/2 bottom-20 md:bottom-6"})[n.position]),w=i(()=>({indigo:"bg-indigo-600 hover:bg-indigo-700 active:bg-indigo-800 text-white shadow-indigo-500/30",green:"bg-green-600 hover:bg-green-700 active:bg-green-800 text-white shadow-green-500/30",red:"bg-red-600 hover:bg-red-700 active:bg-red-800 text-white shadow-red-500/30",blue:"bg-blue-600 hover:bg-blue-700 active:bg-blue-800 text-white shadow-blue-500/30"})[n.color]),y=i(()=>n.extended&&n.label?"h-14 px-6 rounded-full":{sm:"w-12 h-12",md:"w-14 h-14",lg:"w-16 h-16"}[n.size]+" rounded-full"),x=i(()=>({sm:"w-5 h-5",md:"w-6 h-6",lg:"w-7 h-7"})[n.size]),c={plus:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/>',camera:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"/><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 13a3 3 0 11-6 0 3 3 0 016 0z"/>',edit:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"/>',chat:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"/>',upload:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"/>',close:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>',user:'<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>'},u=o=>c[o]||c.plus;return(o,h)=>(s(),a("div",{class:d(["fixed z-40 safe-area-bottom",k.value])},[t.value?(s(),a("div",{key:0,class:"fixed inset-0 bg-black/20 -z-10",onClick:h[0]||(h[0]=l=>t.value=!1)})):r("",!0),C(T,{tag:"div","enter-active-class":"transition-all duration-200 ease-out","enter-from-class":"opacity-0 scale-50 translate-y-4","enter-to-class":"opacity-100 scale-100 translate-y-0","leave-active-class":"transition-all duration-150 ease-in","leave-from-class":"opacity-100 scale-100 translate-y-0","leave-to-class":"opacity-0 scale-50 translate-y-4",class:"flex flex-col items-center gap-3 mb-3"},{default:j(()=>[(s(!0),a(H,null,L(e.actions,(l,z)=>S((s(),a("div",{key:l.icon,class:"flex items-center gap-3",style:B({transitionDelay:`${z*50}ms`})},[l.label?(s(),a("span",V,m(l.label),1)):r("",!0),g("button",{onClick:_=>f(l),class:"w-12 h-12 rounded-full bg-white dark:bg-gray-800 shadow-lg flex items-center justify-center transition-all duration-200 active:scale-95 touch-manipulation"},[(s(),a("svg",{class:"w-5 h-5 text-gray-700 dark:text-gray-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",innerHTML:u(l.icon)},null,8,E))],8,D)],4)),[[A,t.value]])),128))]),_:1}),g("button",{onClick:p,disabled:e.disabled,class:d(["flex items-center justify-center shadow-lg transition-all duration-200 active:scale-95 touch-manipulation disabled:opacity-50 disabled:cursor-not-allowed",[w.value,y.value]])},[(s(),a("svg",{class:d(["transition-transform duration-200",[x.value,{"rotate-45":t.value&&e.actions.length>0}]]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",innerHTML:u(t.value&&e.actions.length>0?"close":e.icon)},null,10,N)),e.extended&&e.label&&!t.value?(s(),a("span",$,m(e.label),1)):r("",!0)],10,F)],2))}};export{I as _};
