"use client"
import{a as l}from"./chunk-ZRLYC43B.mjs";import{l as i,m as n}from"./chunk-ORQ643AR.mjs";import{cva as h}from"class-variance-authority";import{createContext as p,useContext as m,useEffect as b,useRef as x,useState as g}from"react";import{jsx as d}from"react/jsx-runtime";var y=h("w-full group/card border-gray-200 bg-white",{variants:{variant:{compact:"first-of-type:rounded-t-xl last-of-type:rounded-b-xl first-of-type:border-t border-b border-x data-[hover-state-enabled=true]:hover:bg-gray-50 transition-colors",loose:"border rounded-xl transition-[filter] data-[hover-state-enabled=true]:hover:drop-shadow-card-hover"}}}),L="w-full py-2.5 px-4",I=p({hovered:!1});function B({outerClassName:c,innerClassName:f,children:v,onClick:s,hoverStateEnabled:u=!0}){let{variant:C}=m(l),e=x(null),[r,t]=g(!1);return b(()=>{if(!r||!e.current)return;let o=setInterval(()=>{var a;((a=e.current)==null?void 0:a.matches(":hover"))===!1&&t(!1)},1e3);return()=>clearInterval(o)},[r]),d("li",{ref:e,className:n(y({variant:C}),c),onPointerEnter:()=>t(!0),onPointerLeave:()=>t(!1),"data-hover-state-enabled":u,children:d("div",{className:n(L,f),onClick:s?o=>{document.getElementById("modal-backdrop")||i(o)||s()}:void 0,children:d(I.Provider,{value:{hovered:r},children:v})})})}export{I as a,B as b};
