import{u as k,bh as u,dW as m,dX as j,aq as F,bf as g,r as c,j as p,am as v,p as G}from"./index-CK33qGU_.js";const C=()=>{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: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}},D=({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{D,C as u};
