1import{Q as nt,r as u,c as rt,x as dt,f as o,e as Z,d as t,u as G,Z as ut,a as xt,t as a,b as pt,h as w,i as gt,j as y,m as M,v as S,F as v,k,g as c,n as K,y as ct,z as X,o as l}from"./app-5uW00C10.js";const mt={class:"min-h-screen bg-gray-100"},vt={class:"bg-white shadow"},yt={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4"},ft={class:"flex items-center justify-between"},bt={class:"text-2xl font-bold text-gray-900"},_t={class:"text-sm text-gray-500"},ht={class:"flex items-center gap-3"},wt={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6"},kt={class:"bg-white rounded-lg shadow mb-6"},At={class:"px-4 py-5 sm:p-6"},Ct={class:"text-sm font-medium text-gray-700 mb-4"},Vt={class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4"},Ut=["value"],Dt=["value"],Ft=["value"],It={class:"mt-4 flex gap-2"},Mt={class:"bg-white rounded-lg shadow overflow-hidden"},Nt={key:0,class:"p-8 text-center"},jt={key:1,class:"min-w-full divide-y divide-gray-200"},Bt={class:"bg-white divide-y divide-gray-200"},Lt={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-900"},zt={class:"text-xs text-gray-500"},Rt={class:"px-6 py-4 whitespace-nowrap text-sm"},Tt={key:0,class:"text-gray-900"},Ht={key:1,class:"text-xs text-gray-500"},St={key:2,class:"text-gray-400"},$t={class:"px-6 py-4 whitespace-nowrap text-sm"},qt={key:0,class:"text-gray-900"},Et={key:1,class:"text-xs text-gray-500 font-mono"},Pt={key:2,class:"text-gray-400"},Ot={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-900"},Jt={class:"px-6 py-4 whitespace-nowrap text-sm text-gray-900"},Qt={class:"px-6 py-4 whitespace-nowrap"},Wt={class:"px-6 py-4 text-sm"},Zt={class:"flex flex-wrap gap-1 max-w-xs"},Gt={key:0,class:"text-xs text-gray-500"},Kt={key:1,class:"px-2 py-0.5 bg-amber-100 text-amber-800 rounded text-xs"},Xt={class:"px-6 py-4 whitespace-nowrap text-right text-sm font-medium"},Yt=["onClick"],te={key:2,class:"px-6 py-16 text-center"},ee={class:"text-lg font-medium text-gray-900 mb-2"},se={class:"text-sm text-gray-500 mb-2"},ae={class:"text-xs text-gray-400"},le={class:"text-sm text-gray-500"},oe={key:3,class:"bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6"},ie={class:"flex-1 flex justify-between sm:hidden"},ne=["disabled"],re=["disabled"],de={class:"hidden sm:flex-1 sm:flex sm:items-center sm:justify-between"},ue={class:"text-sm text-gray-700"},xe={class:"font-medium"},pe={class:"font-medium"},ge={class:"font-medium"},ce={class:"relative z-0 inline-flex rounded-md shadow-sm -space-x-px"},me=["disabled"],ve={class:"relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700"},ye=["disabled"],fe={key:0,class:"fixed inset-0 z-50 overflow-hidden"},be={class:"fixed inset-y-0 right-0 max-w-2xl w-full bg-white shadow-xl"},_e={class:"h-full flex flex-col"},he={class:"flex-1 overflow-y-auto px-6 py-4"},we={key:0,class:"text-center py-8"},ke={key:1,class:"space-y-6"},Ae={class:"grid grid-cols-2 gap-4"},Ce={class:"text-sm text-gray-900"},Ve={class:"text-sm text-gray-900"},Ue={class:"text-xs text-gray-500"},De={class:"text-sm text-gray-900 font-mono"},Fe={class:"grid grid-cols-2 gap-4"},Ie={class:"text-sm text-gray-900"},Me={class:"text-sm text-gray-900 font-mono text-xs"},Ne={class:"grid grid-cols-2 gap-4"},je={class:"text-sm text-gray-900"},Be={class:"text-sm text-gray-900"},Le={class:"text-sm text-gray-900 font-mono text-xs"},ze={key:0},Re={class:"flex flex-wrap gap-2"},Te={key:0,class:"px-2 py-1 bg-amber-100 text-amber-800 rounded text-sm"},He={key:1},Se={class:"text-sm text-red-700 bg-red-50 p-3 rounded"},$e={key:2},qe={class:"grid grid-cols-2 gap-4"},Ee={class:"text-xs bg-gray-50 p-3 rounded overflow-auto max-h-48"},Pe={class:"text-xs bg-gray-50 p-3 rounded overflow-auto max-h-48"},Oe={class:"px-6 py-4 border-t bg-gray-50 flex gap-3"},Je={key:0,class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Qe={key:1,class:"w-4 h-4 mr-2 text-green-600",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},Ze={__name:"IntegrationActivity",props:{filters:Object,initialFilters:Object},setup(N){var O,J;const Y=nt(),A=N,x=(n,e)=>{var m;const p=n.split(".");let d=(m=Y.props)==null?void 0:m.translations;for(const B of p)d=d==null?void 0:d[B];return d||e},L=u([]),r=u({}),j=u(!1),i=u(null),z=u(!1),$=u(!1),R=u(!1),f=u(""),b=u(""),C=u(""),V=u(""),_=u(""),U=u(""),D=u(((O=A.initialFilters)==null?void 0:O.date_from)||""),F=u(((J=A.initialFilters)==null?void 0:J.date_to)||""),tt=["page","per_page","assistant_uuid","integration_type","user_email","action","result","request_id","date_from","date_to"],I=u(!1),h=async(n=1)=>{j.value=!0;try{const e={page:n,per_page:50,assistant_uuid:f.value||void 0,integration_type:b.value||void 0,user_email:C.value||void 0,action:V.value||void 0,result:_.value||void 0,request_id:U.value||void 0,date_from:D.value||void 0,date_to:F.value||void 0},p={};for(const m of tt)e[m]!==void 0&&(p[m]=e[m]);const d=await X.get(route("admin.integrations.activity.logs"),{params:p});L.value=d.data.data,r.value={current_page:d.data.current_page,last_page:d.data.last_page,per_page:d.data.per_page,total:d.data.total},$.value?d.data.total>0&&(R.value=!0):(R.value=d.data.total>0,$.value=!0)}catch(e){console.error("Failed to fetch logs:",e)}finally{j.value=!1}},et=rt(()=>f.value||b.value||C.value||V.value||_.value||U.value),st=async n=>{z.value=!0;try{const e=await X.get(route("admin.integrations.activity.show",{id:n}));i.value=e.data.log}catch(e){console.error("Failed to fetch log detail:",e)}finally{z.value=!1}},at=()=>{h(1)},lt=()=>{var n,e;f.value="",b.value="",C.value="",V.value="",_.value="",U.value="",D.value=((n=A.initialFilters)==null?void 0:n.date_from)||"",F.value=((e=A.initialFilters)==null?void 0:e.date_to)||"",h(1)},ot=()=>{const n=new URLSearchParams;n.append("date_from",D.value),n.append("date_to",F.value),f.value&&n.append("assistant_uuid",f.value),b.value&&n.append("integration_type",b.value),_.value&&n.append("result",_.value),window.location.href=route("admin.integrations.activity.export")+"?"+n.toString()},T=()=>{i.value=null,I.value=!1},it=async()=>{var e;if(!i.value)return;const n=[`Assistant UUID: ${((e=i.value.assistant)==null?void 0:e.uuid)||"N/A"}`,`Integration: ${i.value.integration_type||"N/A"}`,`Request ID: ${i.value.request_id||"N/A"}`,`Timestamp: ${i.value.created_at}`,`Result: ${i.value.result}`].join(` 2`);try{await navigator.clipboard.writeText(n),I.value=!0,setTimeout(()=>{I.value=!1},2e3)}catch(p){console.error("Failed to copy:",p)}},q=n=>n==="success"?"bg-green-100 text-green-800":"bg-red-100 text-red-800",E=n=>{var e,p;return((p=(e=A.filters)==null?void 0:e.integration_types)==null?void 0:p[n])||n||"N/A"},P=n=>n?JSON.stringify(n,null,2):"N/A";return dt(()=>{h()}),(n,e)=>{var p,d,m,B,Q;return l(),o(v,null,[Z(G(ut),{title:"Integration Activity - Admin"}),t("div",mt,[t("div",vt,[t("div",yt,[t("div",ft,[t("div",null,[t("h1",bt,a(x("app.admin.activity_page.title","Integration Activity")),1),t("p",_t,a(x("app.admin.activity_page.subtitle","Monitor integration configuration changes")),1)]),t("div",ht,[Z(G(gt),{href:n.route("admin.support.playbook"),class:"inline-flex items-center px-3 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"},{default:pt(()=>[e[12]||(e[12]=t("svg",{class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6.042A8.967 8.967 0 006 3.75c-1.052 0-2.062.18-3 .512v14.25A8.987 8.987 0 016 18c2.305 0 4.408.867 6 2.292m0-14.25a8.966 8.966 0 016-2.292c1.052 0 2.062.18 3 .512v14.25A8.987 8.987 0 0018 18a8.967 8.967 0 00-6 2.292m0-14.25v14.25"})],-1)),w(" "+a(x("app.admin.support_playbook","Support Playbook")),1
2)]),_:1},8,["href"]),t("button",{onClick:ot,class:"inline-flex items-center px-3 py-2 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700"},[e[13]||(e[13]=t("svg",{class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})],-1)),w(" "+a(x("app.admin.activity_page.export_csv","Export CSV")),1)])])])])]),t("div",wt,[t("div",kt,[t("div",At,[t("h3",Ct,a(x("app.admin.activity_page.filters","Filters")),1),t("div",Vt,[t("div",null,[e[14]||(e[14]=t("label",{class:"block text-xs font-medium text-gray-500 mb-1"},"Date From",-1)),y(t("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>D.value=s),type:"date",class:"w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-sm"},null,512),[[M,D.value]])]),t("div",null,[e[15]||(e[15]=t("label",{class:"block text-xs font-medium text-gray-500 mb-1"},"Date To",-1)),y(t("input",{"onUpdate:modelValue":e[1]||(e[1]=s=>F.value=s),type:"date",class:"w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-sm"},null,512),[[M,F.value]])]),t("div",null,[e[16]||(e[16]=t("label",{class:"block text-xs font-medium text-gray-500 mb-1"},"User Email",-1)),y(t("input",{"onUpdate:modelValue":e[2]||(e[2]=s=>C.value=s),type:"text",placeholder:"Search by email...",class:"w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-sm"},null,512),[[M,C.value]])]),t("div",null,[e[17]||(e[17]=t("label",{class:"block text-xs font-medium text-gray-500 mb-1"},"Assistant UUID",-1)),y(t("input",{"onUpdate:modelValue":e[3]||(e[3]=s=>f.value=s),type:"text",placeholder:"Paste UUID...",class:"w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-sm"},null,512),[[M,f.value]])]),t("div",null,[e[19]||(e[19]=t("label",{class:"block text-xs font-medium text-gray-500 mb-1"},"Integration Type",-1)),y(t("select",{"onUpdate:modelValue":e[4]||(e[4]=s=>b.value=s),class:"w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-sm"},[e[18]||(e[18]=t("option",{value:""},"All",-1)),(l(!0),o(v,null,k(N.filters.integration_types,(s,g)=>(l(),o("option",{key:g,value:g},a(s),9,Ut))),128))],512),[[S,b.value]])]),t("div",null,[e[21]||(e[21]=t("label",{class:"block text-xs font-medium text-gray-500 mb-1"},"Action",-1)),y(t("select",{"onUpdate:modelValue":e[5]||(e[5]=s=>V.value=s),class:"w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-sm"},[e[20]||(e[20]=t("option",{value:""},"All",-1)),(l(!0),o(v,null,k(N.filters.action_types,(s,g)=>(l(),o("option",{key:g,value:g},a(s),9,Dt))),128))],512),[[S,V.value]])]),t("div",null,[e[23]||(e[23]=t("label",{class:"block text-xs font-medium text-gray-500 mb-1"},"Result",-1)),y(t("select",{"onUpdate:modelValue":e[6]||(e[6]=s=>_.value=s),class:"w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-sm"},[e[22]||(e[22]=t("option",{value:""},"All",-1)),(l(!0),o(v,null,k(N.filters.results,(s,g)=>(l(),o("option",{key:g,value:g},a(s),9,Ft))),128))],512),[[S,_.value]])]),t("div",null,[e[24]||(e[24]=t("label",{class:"block text-xs font-medium text-gray-500 mb-1"},"Request ID",-1)),y(t("input",{"onUpdate:modelValue":e[7]||(e[7]=s=>U.value=s),type:"text",placeholder:"Exact match...",class:"w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-sm"},null,512),[[M,U.value]])])]),t("div",It,[t("button",{onClick:at,class:"px-4 py-2 bg-indigo-600 text-white text-sm font-medium rounded-md hover:bg-indigo-700"},a(x("app.admin.activity_page.apply_filters","Apply Filters")),1),t("button",{onClick:lt,class:"px-4 py-2 bg-gray-200 text-gray-700 text-sm font-medium rounded-md hover:bg-gray-300"},a(x("app.admin.activity_page.reset","Reset")),1)])])]),t("div",Mt,[j.value?(l(),o("div",Nt,[...e[25]||(e[25]=[t("svg",{class:"animate-spin h-8 w-8 text-indigo-600 mx-auto",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[t("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),t("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1),t("p",{class:"mt-2 text-sm text-gray-500"},"Loading...",-1)])])):(l(),o("table",jt,[e[26]||(e[26]=t("thead",{class:"bg-gray-50"},[t("tr",null,[t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"},"Date/Time"),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"},"User"),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"},"Assistant"),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"},"Integration"),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"},"Action"),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"},"Result"),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"},"Changed Fields"),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"})])],-1)),t("tbody",Bt,[(l(!0),o(v,null,k(L.value,s=>{var g,W;return l(),o("tr",{key:s.id,class:"hover:bg-gray-50"},[t("td",Lt,[t("div",null,a(s.created_at),1),t("div",zt,a(s.created_at_human),1)]),t("td",Rt,[s.user?(l(),o("div",Tt,a(s.user.n
2ame),1)):c("",!0),s.user?(l(),o("div",Ht,a(s.user.email),1)):(l(),o("span",St,"N/A"))]),t("td",$t,[s.assistant?(l(),o("div",qt,a(s.assistant.name),1)):c("",!0),s.assistant?(l(),o("div",Et,a(s.assistant.uuid.substring(0,8))+"...",1)):(l(),o("span",Pt,"N/A"))]),t("td",Ot,a(E(s.integration_type)),1),t("td",Jt,a(s.action_label),1),t("td",Qt,[t("span",{class:K(["px-2 inline-flex text-xs leading-5 font-semibold rounded-full",q(s.result)])},a(s.result),3)]),t("td",Wt,[t("div",Zt,[(l(!0),o(v,null,k((g=s.changed_fields)==null?void 0:g.slice(0,3),H=>(l(),o("span",{key:H,class:"px-2 py-0.5 bg-blue-100 text-blue-800 rounded text-xs"},a(H),1))),128)),((W=s.changed_fields)==null?void 0:W.length)>3?(l(),o("span",Gt," +"+a(s.changed_fields.length-3)+" more ",1)):c("",!0),s.secret_changed?(l(),o("span",Kt," secret ")):c("",!0)])]),t("td",Xt,[t("button",{onClick:H=>st(s.id),class:"text-indigo-600 hover:text-indigo-900"},a(x("app.admin.activity_page.details","Details")),9,Yt)])])}),128))])])),!j.value&&L.value.length===0?(l(),o("div",te,[!R.value&&!et.value?(l(),o(v,{key:0},[e[27]||(e[27]=t("div",{class:"mx-auto w-12 h-12 rounded-full bg-gray-100 flex items-center justify-center mb-4"},[t("svg",{class:"w-6 h-6 text-gray-400",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z"})])],-1)),t("h3",ee,a(x("app.admin.activity_page.empty_title","No integration activity yet")),1),t("p",se,a(x("app.admin.activity_page.empty_description","Integration actions will appear here once assistants are configured.")),1),t("p",ae,a(x("app.admin.activity_page.empty_hint","Try enabling or configuring an integration on any assistant.")),1)],64)):(l(),o(v,{key:1},[e[28]||(e[28]=t("div",{class:"mx-auto w-12 h-12 rounded-full bg-gray-100 flex items-center justify-center mb-4"},[t("svg",{class:"w-6 h-6 text-gray-400",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z"})])],-1)),t("p",le,a(x("app.admin.activity_page.no_results","No activity logs found for the selected filters.")),1)],64))])):c("",!0),r.value.total>0?(l(),o("div",oe,[t("div",ie,[t("button",{onClick:e[8]||(e[8]=s=>h(r.value.current_page-1)),disabled:r.value.current_page<=1,class:"relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 disabled:opacity-50"}," Previous ",8,ne),t("button",{onClick:e[9]||(e[9]=s=>h(r.value.current_page+1)),disabled:r.value.current_page>=r.value.last_page,class:"ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 disabled:opacity-50"}," Next ",8,re)]),t("div",de,[t("div",null,[t("p",ue,[e[29]||(e[29]=w(" Showing ",-1)),t("span",xe,a((r.value.current_page-1)*r.value.per_page+1),1),e[30]||(e[30]=w(" to ",-1)),t("span",pe,a(Math.min(r.value.current_page*r.value.per_page,r.value.total)),1),e[31]||(e[31]=w(" of ",-1)),t("span",ge,a(r.value.total),1),e[32]||(e[32]=w(" results ",-1))])]),t("div",null,[t("nav",ce,[t("button",{onClick:e[10]||(e[10]=s=>h(r.value.current_page-1)),disabled:r.value.current_page<=1,class:"relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50 disabled:opacity-50"},[...e[33]||(e[33]=[t("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[t("path",{"fill-rule":"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z","clip-rule":"evenodd"})],-1)])],8,me),t("span",ve,a(r.value.current_page)+" / "+a(r.value.last_page),1),t("button",{onClick:e[11]||(e[11]=s=>h(r.value.current_page+1)),disabled:r.value.current_page>=r.value.last_page,class:"relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50 disabled:opacity-50"},[...e[34]||(e[34]=[t("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[t("path",{"fill-rule":"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z","clip-rule":"evenodd"})],-1)])],8,ye)])])])])):c("",!0)])]),(l(),xt(ct,{to:"body"},[i.value?(l(),o("div",fe,[t("div",{class:"absolute inset-0 bg-gray-500 bg-opacity-75",onClick:T}),t("div",be,[t("div",_e,[t("div",{class:"px-6 py-4 bg-gray-50 border-b flex items-center justify-between"},[e[36]||(e[36]=t("h2",{class:"text-lg font-medium text-gray-900"},"Activity Details",-1)),t("button",{onClick:T,class:"text-gray-400 hover:text-gray-500"},[...e[35]||(e[35]=[t("svg",{class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)])])]),t("div",he,[z.value?(l(),o("div",we,[...e[37]||(e[37]=[t("svg",{class:"animate-spin h-8 w-8 text-indigo-600 mx-auto",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[t("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),t("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)])])):(l(),o("div",ke,[t("div",null,[e[42]||(e[42]=t("h3",{class:"text-sm font-medium text-gray-500 mb-2"},"Basic Information",-1)),t("dl",Ae,[t("div",null,[e[38]||(e[38]=t("dt",{class:"text-xs text-gray-500"},"Date/Time",-1)),t("dd",Ce,a(i.value.created_at),1)]),t("div",null,[e[39]||(e[39]=t("dt",{class:"text-xs text-gray-500"},"Result",-1)),t("dd",null,[t("span",{class:K(["px-2 inline-flex text-xs leading-5 font-semibold rounded-full",q(i.value.result)])},a(i.value.result),3)])]),t("div",null,[e[40]||(e[40]=t("dt",{class:"text-xs text-gray-500"},"User",-1)),t("dd",Ve,a(((p=i.value.user)==null?void 0:p.name)||"N/A"),1),t("dd",Ue,a((d=i.value.user)==null?void 0:d.email),1)]),t("div",null,[e[41]||(e[41]=t("dt",{class:"text-xs text-gray-500"},"IP Address",-1)),t("dd",De,a(i.value.ip_address||"N/A"),1)])])]),t("div",null,[e[45]||(e[45]=t("h3",{class:"text-sm font-medium text-gray-500 mb-2"},"Assistant",-1)),t("dl",Fe,[t("div",null,[e[43]||(e[43]=t("dt",{class:"text-xs text-gray-500"},"Name",-1)),t("dd",Ie,a(((m=i.value.assistant)==null?void 0:m.name)||"N/A"),1)]),t("div",null,[e[44]||(e[44]=t("dt",{class:"text-xs text-gray-500"},"UUID",-1)),t("dd",Me,a(((B=i.value.assistant)==null?void 0:B.uuid)||"N/A"),1)])])]),t("div",null,[e[49]||(e[49]=t("h3",{class:"text-sm font-medium text-gray-500 mb-2"},"Action",-1)),t("dl",Ne,[t("div",null,[e[46]||(e[46]=t("dt",{class:"text-xs text-gray-500"},"Action",-1)),t("dd",je,a(i.value.action_label),1)]),t("div",null,[e[47]||(e[47]=t("dt",{class:"text-xs text-gray-500"},"Integration",-1)),t("dd",Be,a(E(i.value.integration_type)),1)]),t("div",null,[e[48]||(e[48]=t("dt",{class:"text-xs text-gray-500"},"Request ID",-1)),t("dd",Le,a(i.value.request_id||"N/A"),1)])])]),(Q=i.value.changed_fields)!=null&&Q.length?(l(),o("div",ze,[e[50]||(e[50]=t("h3",{class:"text-sm font-medium text-gray-500 mb-2"},"Changed Fields",-1)),t("div",Re,[(l(!0),o(v,null,k(i.value.changed_fields,s=>(l(),o("span",{key:s,class:"px-2 py-1 bg-blue-100 text-blue-800 rounded text-sm"},a(s),1))),128)),i.value.secret_changed?(l(),o("span",Te," secret
2changed ")):c("",!0)])])):c("",!0),i.value.failure_reason?(l(),o("div",He,[e[51]||(e[51]=t("h3",{class:"text-sm font-medium text-red-500 mb-2"},"Failure Reason",-1)),t("p",Se,a(i.value.failure_reason),1)])):c("",!0),i.value.old_values||i.value.new_values?(l(),o("div",$e,[e[54]||(e[54]=t("h3",{class:"text-sm font-medium text-gray-500 mb-2"},"Configuration Changes (Redacted)",-1)),t("div",qe,[t("div",null,[e[52]||(e[52]=t("h4",{class:"text-xs text-gray-500 mb-1"},"Before",-1)),t("pre",Ee,a(P(i.value.old_values)),1)]),t("div",null,[e[53]||(e[53]=t("h4",{class:"text-xs text-gray-500 mb-1"},"After",-1)),t("pre",Pe,a(P(i.value.new_values)),1)])])])):c("",!0)]))]),t("div",Oe,[t("button",{onClick:it,class:"flex-1 inline-flex items-center justify-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50"},[I.value?(l(),o("svg",Qe,[...e[56]||(e[56]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M4.5 12.75l6 6 9-13.5"},null,-1)])])):(l(),o("svg",Je,[...e[55]||(e[55]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15.666 3.888A2.25 2.25 0 0013.5 2.25h-3c-1.03 0-1.9.693-2.166 1.638m7.332 0c.055.194.084.4.084.612v0a.75.75 0 01-.75.75H9a.75.75 0 01-.75-.75v0c0-.212.03-.418.084-.612m7.332 0c.646.049 1.288.11 1.927.184 1.1.128 1.907 1.077 1.907 2.185V19.5a2.25 2.25 0 01-2.25 2.25H6.75A2.25 2.25 0 014.5 19.5V6.257c0-1.108.806-2.057 1.907-2.185a48.208 48.208 0 011.927-.184"},null,-1)])])),w(" "+a(I.value?x("app.admin.activity_page.copied","Copied!"):x("app.admin.activity_page.copy_context","Copy Context")),1)]),t("button",{onClick:T,class:"flex-1 px-4 py-2 bg-gray-200 text-gray-700 text-sm font-medium rounded-md hover:bg-gray-300"},a(x("app.admin.activity_page.close","Close")),1)])])])])):c("",!0)]))])],64)}}};export{Ze 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.