import{r as _,c as n,o,b as i,d as t,w as k,k as g,t as e,F as h,h as v,g as y,n as C,u as $}from"./app-fEKA3BkQ.js";import{_ as D}from"./PageHeader-DmRLoM5E.js";import{_ as L}from"./NoDataFound-Xi4CpDbx.js";import{_ as S}from"./Paginate-D_g9VFI3.js";import{u as w}from"./assetStore-BSVLrDIW.js";import{_ as B}from"./JsonHighlighter-ChEaFirs.js";import{_ as M}from"./UserLayout-D_lxcpvH.js";import{h as T}from"./moment-BAtM24Ew.js";import"./ValidationErrors-B24rcOPH.js";const Y={class:"table-responsive w-full"},q={class:"table"},F={class:"!text-right"},N={class:"!text-right"},V={key:0,class:"tbody"},x={class:"!text-right"},z={class:"!text-right"},R=["onClick"],j=["onClick"],Q=Object.assign({layout:M},{__name:"Logs",props:["app","logs"],setup(r){const f=w(),l=_("request"),c=_(null),d=(s,u)=>{c.value=s,l.value=u,f.open("modal",l.value)};return(s,u)=>(o(),n(h,null,[i(D,{modalSize:"w-3/5","header-state":!0,"header-title":"Log Details - "+l.value,state:"modal"},{default:k(()=>[i(B,{code:c.value[l.value]},null,8,["code"])]),_:1},8,["header-title"]),t("div",Y,[t("table",q,[t("thead",null,[t("tr",null,[t("th",null,e(s.trans("Platform")),1),t("th",null,e(s.trans("To")),1),t("th",null,e(s.trans("Status")),1),t("th",F,e(s.trans("Data Time")),1),t("th",N,e(s.trans("Action")),1)])]),r.logs.data.length?(o(),n("tbody",V,[(o(!0),n(h,null,v(r.logs.data,(a,p)=>{var m;return o(),n("tr",{key:p},[t("td",null,e((m=a.platform)==null?void 0:m.name),1),t("td",null,e(a.to),1),t("td",null,[a.status_code?(o(),n("span",{key:0,class:C(["badge",a.status_code==200?"badge-success":"badge-danger"])},e(a.status_code),3)):y("",!0)]),t("td",x,e($(T)(a.created_at).format("DD/MM/YYYY h:m a")),1),t("td",z,[t("button",{class:"btn btn-outline-primary btn-xs mr-2",onClick:b=>d(a,"request")},e(s.trans("Request")),9,R),t("button",{class:"btn btn-outline-info btn-xs",onClick:b=>d(a,"response")},e(s.trans("Response")),9,j)])])}),128))])):(o(),g(L,{key:1,forTable:!0}))]),i(S,{links:r.logs.links},null,8,["links"])])],64))}});export{Q as default};
