import{u as k,bX as u,eL as m,eM as j,au as F,bW as g,r as c,j as p,an as v,d as C}from"./index-DNBEEyYo.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]),d=c.useCallback(({name:e},{id:s})=>!!a.find(({features:n,fg:f})=>!!n.find(({name:h})=>h===e)&&f.id===s),[a]),l=c.useCallback((e,s)=>e.every(n=>d(n,s)),[d]),x=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:x,isActiveFeature:d,isActiveFeatures:l,isActiveFg:b}},D=({short:t=!1,sx:r,...a})=>p.jsx(v,{disabled:!t,position:"left",mainText:"Deprecated",children:p.jsx(C,{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{D,S as u};
