import{_ as y}from"./AdminLayout-bd13ff9d.js";import{_ as C}from"./PageHeader-8c638686.js";import{s as x,p as l,h as v,c as i,a as r,b as t,t as s,u as e,F as N,r as G,i as R,g as T,o as n,j as $,k as w}from"./app-13978987.js";import{_ as B}from"./Paginate-f61b79b2.js";import{h as D}from"./moment-a9aaa855.js";import L from"./OverviewGrid-21ea6fc2.js";import{_ as Y}from"./NoDataFound-bc81d7fa.js";import"./dropdown-45d66330.js";const F={class:"container p-4 sm:p-6"},M={class:"space-y-6"},V={class:"table-responsive whitespace-nowrap rounded-primary"},j={class:"table"},A={class:"text-end"},E={key:0},q={class:"capitalize"},z={class:"text-left"},H={class:"text-end"},I=T({layout:y}),Z=Object.assign(I,{__name:"Index",props:["aiGenerated","total","totalCharges","totalResults","buttons","segments","request","type"],setup(o){const{formatCurrency:d,textExcerpt:u,trim:p}=x(),c=o,f=[{value:c.total,title:l("Total Records"),iconClass:"bx:badge"},{value:c.totalCharges,title:l("Total Charges"),iconClass:"bx:badge-check"},{value:c.totalResults,title:l("Total Results"),iconClass:"bx:bullseye"}];return(b,O)=>{const k=v("Link");return n(),i("main",F,[r(C,{title:"Generated History",buttons:o.buttons},null,8,["buttons"]),t("div",M,[r(L,{items:f,grid:"3"}),t("div",V,[t("table",j,[t("thead",null,[t("tr",null,[t("th",null,s(e(l)("Generated For")),1),t("th",null,s(e(l)("Title/Name")),1),t("th",null,s(e(l)("User Name")),1),t("th",null,s(e(l)("Charge")),1),t("th",null,s(e(l)("Result")),1),t("th",null,s(e(l)("Length")),1),t("th",null,s(e(l)("Content")),1),t("th",null,[t("p",A,s(e(l)("Date")),1)])])]),o.aiGenerated.total>0?(n(),i("tbody",E,[(n(!0),i(N,null,G(o.aiGenerated.data,a=>{var m;return n(),i("tr",{key:a.id},[t("td",q,s(e(p)(a.type??"N/A")),1),t("td",null,[r(k,{href:b.route("admin.users.show",a.user_id)},{default:$(()=>{var _,h;return[w(s(e(u)(((_=a==null?void 0:a.generatable)==null?void 0:_.title)||((h=a==null?void 0:a.generatable)==null?void 0:h.name)||"N/A",30)),1)]}),_:2},1032,["href"])]),t("td",null,s((m=a.user)==null?void 0:m.name),1),t("td",null,s(e(d)(a.charge)),1),t("td",null,s(a.result),1),t("td",null,s(a.length),1),t("td",null,s(e(u)(a.content,100)),1),t("td",z,[t("p",H,s(e(D)(a.updated_at).format("DD MMM, YYYY")),1)])])}),128))])):(n(),R(Y,{key:1,"for-table":"true"}))])]),r(B,{links:o.aiGenerated.links},null,8,["links"])])])}}});export{Z as default};
