import{u as k,bK as u,eq as m,er as j,az as F,bI as g,r as c,j as p,at as v,b as G}from"./index-C1DmWO_C.js";const S=()=>{const{id:t}=k(),r=u(m),a=u(j),{data:{id:i}={}}=F(),o=g(),b=c.useCallback(e=>!!a.find(({fg:s})=>s.id===e),[a]),l=c.useCallback(({name:e},{id:s})=>!!a.find(({features:n,fg:f})=>!!n.find(({name:h})=>h===e)&&f.id===s),[a]),d=c.useCallback((e,s)=>e.every(n=>l(n,s)),[l]),x=c.useCallback((e,s)=>()=>{d(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,d,t,i]);return{isSwitch:r,handleBasket:x,isActiveFeature:l,isActiveFeatures:d,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,S as u};
