import{u as k,b3 as u,dY as m,dZ as g,cK as j,b1 as F,r as c,j as p,af as v,g as G}from"./index-ea7817a2.js";const A=()=>{const{id:t}=k(),r=u(m),a=u(g),{data:{id:i}={}}=j(),o=F(),b=c.useCallback(e=>!!a.find(({fg:s})=>s.id===e),[a]),d=c.useCallback(({name:e},{id:s})=>!!a.find(({features:n,fg:x})=>!!n.find(({name:h})=>h===e)&&x.id===s),[a]),l=c.useCallback((e,s)=>e.every(n=>d(n,s)),[d]),f=c.useCallback((e,s)=>()=>{l(e,s)?o.basket.deleteFeatures({features:e,featureGroup:s,projectId:+t,userId:i}):o.basket.addFeatures({features:e,featureGroup:s,projectId:+t,userId:i})},[o,l,t,i]);return{isSwitch:r,handleBasket:f,isActiveFeature:d,isActiveFeatures:l,isActiveFg:b}},C=({short:t=!1,sx:r,...a})=>p.jsx(v,{disabled:!t,position:"left",mainText:"Deprecated",children:p.jsx(G,{sx:{px:"5px",height:"20px",bg:"var(--quartz-colors-labels-orange-_light) !important",color:"black !important",fontSize:"14px",fontStyle:"italic",...r},...a,children:t?"d":"deprecated"})});export{C as D,A as u};
