import{u as k,bI as n,eK as m,eL as j,ax as F,bH as g,r as c,j as p,ao as v,f as G}from"./index-46ma1THH.js";const S=()=>{const{id:t}=k(),r=n(m),a=n(j),{data:{id:i}={}}=F(),o=g(),f=c.useCallback(e=>!!a.find(({fg:s})=>s.id===e),[a]),l=c.useCallback(({name:e},{id:s})=>!!a.find(({features:u,fg:b})=>!!u.find(({name:h})=>h===e)&&b.id===s),[a]),d=c.useCallback((e,s)=>e.every(u=>l(u,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:f}},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};
