import{_ as C}from"./Paginate-BZTS8QtF.js";import{_ as v}from"./AssetModal-C18ToIEK.js";import{d as N,s as $,r as p,c as a,o as l,a as t,b as n,e as D,i as d,t as o,F as _,g,u as r,n as B,w as h,N as S}from"./app-Do7K7VDV.js";import{_ as F}from"./NoDataFound-oJx-Mfyi.js";import{_ as j}from"./UserLayout-B1erUghk.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./InputFieldError-0BmYlL24.js";import"./ToastrContainer-CtYDvNPN.js";const x={class:"table-responsive whitespace-nowrap rounded-primary"},I={class:"table"},L={class:"text-right"},V={class:"flex justify-end"},z={class:"text-left"},A={class:"text-right capitalize"},E={class:"flex justify-end"},P={class:"dropdown-list"},M={key:0,class:"dropdown-list-item"},O=["onClick"],R={key:1,class:"dropdown-list-item"},W={class:"dropdown-list-item"},q=["onClick"],G={class:"dropdown-list-item"},H=["onClick"],J=N({layout:j}),et=Object.assign(J,{__name:"Show",props:["aiTrainings","provider","isDev"],setup(i){const{textExcerpt:k,deleteRow:u,badgeClass:f,trim:b}=$(),y=s=>{S.patch(route("user.ai-training.check-status",s.id))};return(s,K)=>{const c=p("Icon"),w=p("Link");return l(),a(_,null,[t("div",x,[t("table",I,[t("thead",null,[t("tr",null,[t("th",null,o(s.trans("Title")),1),t("th",null,o(s.trans("File Name In Provider")),1),t("th",L,o(s.trans("Status")),1),t("th",V,o(s.trans("Action")),1)])]),t("tbody",null,[(l(!0),a(_,null,g(i.aiTrainings.data,e=>(l(),a("tr",{key:e.id},[t("td",null,o(r(k)(e.title,50)),1),t("td",z,o((e==null?void 0:e.model_name)??"N/A"),1),t("td",A,[t("span",{class:B(r(f)(e.status))},o(r(b)(e.status)),3)]),t("td",E,[n(v,{position:"right","btn-type":"icon","icon-name":"bx:dots-vertical-rounded","btn-class":"p-0"},{default:h(()=>[t("ul",P,[e.status!=="success"?(l(),a("li",M,[t("button",{type:"button",class:"dropdown-link",onClick:m=>y(e)},[n(c,{icon:"bx:log-in-circle"}),t("span",null,o(s.trans("Check Status")),1)],8,O)])):d("",!0),i.isDev?(l(),a("li",R,[n(w,{href:s.route("user.ai-training.test-prompt",e.id),class:"dropdown-link"},{default:h(()=>[n(c,{icon:"material-symbols:network-check-rounded"}),t("span",null,o(s.trans("Test Prompt")),1)]),_:2},1032,["href"])])):d("",!0),t("li",W,[t("button",{type:"button",class:"dropdown-link",onClick:m=>r(u)(s.route("user.ai-training.destroy-record",e.id))},[n(c,{icon:"bx:trash-alt"}),t("span",null,o(s.trans("Delete From DB")),1)],8,q)]),t("li",G,[t("button",{type:"button",class:"dropdown-link",onClick:m=>r(u)(s.route("user.ai-training.destroy",e.id))},[n(c,{icon:"bx:trash"}),t("span",null,o(s.trans("Delete With Model")),1)],8,H)])])]),_:2},1024)])]))),128))]),i.aiTrainings.data.length<1?(l(),D(F,{key:0,"for-table":!0})):d("",!0)])]),n(C,{links:i.aiTrainings.links},null,8,["links"])],64)}}});export{et as default};
