1import{A as _,B as w,r as g,d as C,o as V,e as d,f as t,g as m,l as A,x as I,k as a,p as N,F as T,j as B,t as s,i as L,s as u,y as l,z as P,C as j}from"./DvXNe_bl.js";import{u as z}from"./DsNlQn3X.js";const F={class:"min-h-screen bg-gray-50 dark:bg-gray-900 py-8"},D={class:"container mx-auto px-4 max-w-7xl"},M={class:"mb-6"},$={class:"bg-white dark:bg-gray-800 rounded-lg shadow-sm border border-gray-200 dark:border-gray-700 overflow-hidden"},q={class:"overflow-x-auto"},E={class:"w-full"},H={class:"divide-y divide-gray-200 dark:divide-gray-700"},R={key:0},S={key:1},U={class:"px-6 py-4 font-medium text-gray-900 dark:text-white font-mono text-sm"},Y={class:"px-6 py-4 text-sm text-gray-600 dark:text-gray-400"},G={class:"px-6 py-4 text-center text-sm text-gray-600 dark:text-gray-400"},J={class:"px-6 py-4 text-center"},K={class:"px-6 py-4 text-center"},O=["onClick"],Q={key:0,class:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4"},W={class:"bg-white dark:bg-gray-800 rounded-lg shadow-xl max-w-3xl w-full max-h-[90vh] overflow-hidden"},X={class:"flex items-center justify-between p-6 border-b border-gray-200 dark:border-gray-700"},Z={class:"text-xl font-bold text-gray-900 dark:text-white font-mono"},tt={class:"p-6 overflow-y-auto max-h-[calc(90vh-140px)]"},et={class:"mb-4 flex gap-4 text-sm text-gray-600 dark:text-gray-400"},rt={class:"bg-gray-50 dark:bg-gray-900/50 rounded-lg p-4 border border-gray-200 dark:border-gray-700"},at={class:"whitespace-pre-wrap text-sm text-gray-800 dark:text-gray-200 font-mono"},lt=_({__name:"prompts",setup(st){w({title:"Prompts â Admin"});const{get:b}=z(),x=g([]),p=g(!1),i=g(""),o=g(null),f=C(()=>{if(!i.value)return x.value;const n=i.value.toLowerCase();return x.value.filter(e=>{var c,r;return((c=e.name)==null?void 0:c.toLowerCase().includes(n))||((r=e.variant)==null?void 0:r.toLowerCase().includes(n))})});let y=null;const v=()=>{clearTimeout(y),y=setTimeout(()=>{},300)};async function k(){p.value=!0;try{const n=await b("/admin/prompts");x.value=n.data||n}catch{}p.value=!1}function h(n){o.value=n}return V(k),(n,e)=>{const c=j;return l(),d("div",F,[t("div",D,[e[8]||(e[8]=t("div",{class:"mb-8"},[t("h1",{class:"text-3xl font-bold text-gray-900 dark:text-white mb-2"},"Prompts"),t("p",{class:"text-gray-600 dark:text-gray-400"},"ÎιαÏείÏιÏη prompt templates για Ïο AI ÏÏÏÏημα")],-1)),t("div",M,[A(t("input",{"onUpdate:modelValue":e[0]||(e[0]=r=>N(i)?i.value=r:null),type:"text",placeholder:"ÎναζήÏηÏη prompts...",onInput:v,class:"w-full max-w-md px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-800 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent"},null,544),[[I,a(i)]])]),t("div",$,[t("div",q,[t("table",E,[e[4]||(e[4]=t("thead",{class:"bg-gray-50 dark:bg-gray-900/50 border-b border-gray-200 dark:border-gray-700"},[t("tr",null,[t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"},"Îνομα"),t("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"},"Variant"),t("th",{class:"px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"},"Version"),t("th",{class:"px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"},"ÎαÏάÏÏαÏη"),t("th",{class:"px-6 py-3 text-center text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider"},"ÎνÎÏγειεÏ")])],-1)),t("tbody",H,[a(p)?(l(),d("tr",R,e[2]||(e[2]=[t("td",{colspan:"5",class:"px-6 py-8 text-center text-gray-500 dark:text-gray-400"},"ΦÏÏÏÏÏη...",-1)]))):a(x).length?m("",!0):(l(),d("tr",S,e[3]||(e[3]=[t("td",{colspan:"5",class:"px-6 py-8 text-center text-gray-500 dark:text-gray-400"},"Îεν βÏÎθηκαν prompts",-1)]))),(l(!0),d(T,null,B(a(f),r=>(l(),d("tr",{key:r.id,class:"hover:bg-gray-50 dark:hover:bg-gray-700/50"},[t("td",U,s(r.name),1),t("td",Y,s(r.variant||"default"),1),t("td",G,"v"+s(r.version),1
1),t("td",J,[t("span",{class:P(["inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium",r.active?"bg-green-100 text-green-800 dark:bg-green-900/20 dark:text-green-400":"bg-gray-100 text-gray-600 dark:bg-gray-700 dark:text-gray-400"])},s(r.active?"Active":"Inactive"),3)]),t("td",K,[t("button",{onClick:ot=>h(r),class:"text-blue-600 hover:text-blue-700 dark:text-blue-400 text-sm font-medium"},"Î Ïοβολή",8,O)])]))),128))])])])]),a(o)?(l(),d("div",Q,[t("div",W,[t("div",X,[t("h2",Z,s(a(o).name),1),t("button",{onClick:e[1]||(e[1]=r=>o.value=null),class:"text-gray-500 hover:text-gray-700 dark:text-gray-400"},[L(c,{name:"mdi:close",class:"w-6 h-6"})])]),t("div",tt,[t("div",et,[t("span",null,[e[5]||(e[5]=u("Version: ")),t("strong",null,s(a(o).version),1)]),t("span",null,[e[6]||(e[6]=u("Variant: ")),t("strong",null,s(a(o).variant||"default"),1)]),t("span",null,[e[7]||(e[7]=u("Active: ")),t("strong",null,s(a(o).active?"Yes":"No"),1)])]),t("div",rt,[t("pre",at,s(a(o).template),1)])])])])):m("",!0)])])}}});export{lt 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.