1import{j as e}from"./vendor-tanstack-BiqnNy5e.js";import l from"./vendor-axios-B0yp3bM1.js";import{g as m}from"./vendor-firebase-xu79lQ3X.js";import{am as x,A as h,n as s}from"./app-CN2ZKy2d.js";import{bb as b}from"./vendor-lucide-Cw5HXB-T.js";import"./customers-CNeAYvjH.js";import"./vendor-redux-ie4FCbL6.js";import"./vendor-mixpanel-QjpN6lsZ.js";function A(){const{wabas:r,setWabas:a}=x(),i=m(),o=async t=>{if(confirm("Remove this WABA?"))try{const d=await i.currentUser?.getIdToken();await l.delete(`${h}/admin/wabas/${t}`,{headers:{Authorization:`Bearer ${d}`}}),a(n=>n.filter(c=>c.id!==t)),s.success("WABA removed")}catch{s.error("Failed")}};return e.jsx(p,{title:"WhatsApp Business Management",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-xs tracking-widest text-gray-400 uppercase border-b border-gray-100 dark:border-zinc-800 dark:text-gray-500",children:[e.jsx("th",{className:"py-4 font-semibold",children:"Phone Number"}),e.jsx("th",{className:"py-4 font-semibold",children:"Workspace"}),e.jsx("th",{className:"py-4 font-semibold",children:"Linked Assistant"}),e.jsx("th",{className:"py-4 font-semibold text-right",children:"Actions"})]})}),e.jsx("tbody",{className:"text-sm",children:r.map(t=>e.jsxs("tr",{className:"border-b border-gray-50 dark:border-zinc-800",children:[e.jsx("td",{className:"py-4 font-mono font-medium text-gray-950 dark:text-white",children:t.wabaNumber}),e.jsx("td",{className:"py-4 text-gray-600 dark:text-gray-300",children:t.workspace?.name}),e.jsx("td",{className:"py-4 italic text-black dark:text-gray-200",children:t.assistant?.name||"Not Linked"}),e.jsx("td",{className:"py-4 text-right",children:e.jsxs("button",{onClick:()=>o(t.id),className:"inline-flex items-center gap-2 px-3 py-1.5 border border-black text-xs font-bold uppercase hover:bg-black hover:text-white transition-all dark:border-white dark:text-white dark:hover:bg-white dark:hover:text-black",children:[e.jsx(b,{size:12}),"Remove"]})})]},t.id))})]})})})}function p({title:r,children:a}){return e.jsxs("div",{className:"p-6 bg-white border border-gray-200 rounded-2xl dark:bg-zinc-950 dark:border-zinc-800",children:[e.jsx("h2",{className:"mb-4 text-sm font-bold uppercase text-gray-950 dark:text-white",children:r}),a]})}export{A as default};
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.