import{u as k,b2 as u,dU as m,dV as j,cH as F,b0 as g,r as c,j as p,ae as v,f as D}from"./index-d6499a22.js";const S=()=>{const{id:t}=k(),r=u(m),a=u(j),{data:{id:i}={}}=F(),o=g(),f=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]),b=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:b,isActiveFeature:d,isActiveFeatures:l,isActiveFg:f}},C=({short:t=!1,sx:r,...a})=>p.jsx(v,{disabled:!t,position:"left",mainText:"Deprecated",children:p.jsx(D,{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};
