import{u as k,aL as n,eq as m,er as j,av as v,aD as F,r,j as p,ar as g,Q as D}from"./index-dP1W1_bd.js";const I=()=>{const{id:t}=k(),c=n(m),a=n(j),{data:{id:i}={}}=v(),o=F(),x=r.useCallback(e=>!!a.find(({fg:s})=>s.id===e),[a]),l=r.useCallback(({name:e},{id:s})=>!!a.find(({features:u,fg:b})=>!!u.find(({name:h})=>h===e)&&b.id===s),[a]),d=r.useCallback((e,s)=>e.every(u=>l(u,s)),[l]),f=r.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:c,handleBasket:f,isActiveFeature:l,isActiveFeatures:d,isActiveFg:x}},S=({short:t=!1,sx:c,...a})=>p.jsx(g,{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",...c},...a,children:t?"d":"deprecated"})});export{S as D,I as u};
