1import{j as t}from"./jsx-runtime-C-_spy54.js";import{r as D,c as E,f as L}from"./chunk-KNED5TY2-6IudgIT3.js";import{c as n}from"./clsx-B-dksMZM.js";import{L as M}from"./LinkOrAhref-CVdpqXQg.js";import{C as R}from"./ConfirmModal-CndShimi.js";import{B as h}from"./button-B8_htMpl.js";import{u as w}from"./useRootData-DgqUJvN1.js";import{A as N}from"./AnalyticsHelper-B-ViWNx5.js";import{u as T}from"./useTranslation-DSMr-r6L.js";function K({className:i="",type:p="button",onClick:a,disabled:c,destructive:e,to:m,target:d,rel:x,children:u,reloadDocument:j,prefetch:g,confirmation:o,event:r,sendEvent:b}){const{t:l}=T(),s=D.useRef(null);let f=E();const v=w(),y=L();function B(C){if(a&&a(C),!r||!b)return;const k=y.find(A=>A.pathname==f.pathname);N.addEvent({url:f.pathname,route:k?.id,rootData:v,action:r.action,category:r.category,label:r.label,value:r.value})}return t.jsxs("span",{children:[!m||c?t.jsx(h,{variant:"ghost",className:n(i,e&&"text-red-500 hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-900 dark:hover:text-white"),onClick:o?()=>{s.current?.setDestructive(e||!1),s.current?.show(o.title,l("shared.confirm"),l("shared.cancel"),o.description)}:B,type:p,disabled:c,children:u}):t.jsx(h,{asChild:!0,variant:"ghost",className:n(e&&"text-red-500"),children:t.jsx(M,{reloadDocument:j,to:m,target:d,rel:x,prefetch:g,className:n(i),children:u})}),t.jsx(R,{ref:s,onYes:a})]})}export{K as B};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.