import{B as v,X as k,C as r,j as i,t as n,m as o,k as e,y as s,E as m,x as h,z as y,F as w,q as S,D as $}from"./vendor-CoimUlS3.js";import{L as P}from"./Layout-DhxLvS0V.js";import{S as V}from"./SearchInput-CQhaAWWY.js";import{P as L}from"./Pagination-D_wo4K-u.js";import{p as C}from"./pickBy-_N4B5OFc.js";import{t as u}from"./throttle-DRsYW0Dx.js";import{m as B}from"./mapValues-CJnTf0SX.js";import{_ as I}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{LucidePlus as N}from"./ui-CI37mw-K.js";import"./utils-CXPYudwi.js";import"./LogoutButton-BZlSuKxY.js";import"./app-W9XHfen4.js";/* empty css                                                                 */import"./Logo-DiOikIGZ.js";import"./FlashMessages-D1juQjH6.js";const j={layout:P,components:{Head:k,Link:v,SearchInput:V,Pagination:L,Plus:N},props:{services:Object,filters:Object,title:String},data(){return{form:{search:this.filters.search}}},methods:{search:u(function(){this.$inertia.get(route("dashboard.services"),C(this.form),{preserveState:!0})},300),reset(){this.form=B(this.form,()=>null),this.$inertia.get(route("dashboard.services"))}},watch:{form:{deep:!0,handler:u(function(){this.search()},300)}}},A={class:"min-h-screen bg-slate-50 dark:bg-slate-900"},E={class:"bg-white dark:bg-slate-800 shadow-sm border-b border-slate-200 dark:border-slate-700"},H={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 flex items-center justify-between"},z={class:"text-2xl font-bold text-slate-900 dark:text-white"},D={class:"text-sm text-slate-500 dark:text-slate-400"},F={class:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8"},M={class:"mb-6 bg-white dark:bg-slate-800 rounded-lg p-4 border border-slate-200 dark:border-slate-700"},O={class:"bg-white dark:bg-slate-800 rounded-lg border border-slate-200 dark:border-slate-700 overflow-hidden"},R={class:"w-full"},q={class:"bg-slate-50 dark:bg-slate-700"},T={class:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase"},U={class:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase"},X={class:"px-6 py-3 text-left text-xs font-medium text-slate-500 uppercase"},G={class:"px-6 py-3 text-right text-xs font-medium text-slate-500 uppercase"},J={class:"divide-y divide-slate-200 dark:divide-slate-700"},K={class:"px-6 py-4"},Q={class:"px-6 py-4 text-slate-500"},W={class:"px-6 py-4"},Y={class:"px-6 py-4 text-right"},Z={key:0,class:"text-center py-12 text-slate-500"},ee={class:"mt-6"};function te(t,d,l,se,c,x){const f=r("Head"),_=r("Plus"),p=r("Link"),b=r("SearchInput"),g=r("Pagination");return n(),i("div",A,[o(f,{title:t.$t(l.title)},null,8,["title"]),e("div",E,[e("div",H,[e("div",null,[e("h1",z,s(t.$t("Services Management")),1),e("p",D,s(t.$t("Manage public service detail pages")),1)]),o(p,{href:t.route("dashboard.services.create"),class:"inline-flex items-center gap-2 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700"},{default:m(()=>[o(_,{class:"w-4 h-4"}),h(" "+s(t.$t("Create Service")),1)]),_:1},8,["href"])])]),e("div",F,[e("div",M,[o(b,{modelValue:c.form.search,"onUpdate:modelValue":d[0]||(d[0]=a=>c.form.search=a),class:"w-full",onReset:x.reset,placeholder:t.$t("Search services...")},null,8,["modelValue","onReset","placeholder"])]),e("div",O,[e("table",R,[e("thead",q,[e("tr",null,[e("th",T,s(t.$t("Service")),1),e("th",U,s(t.$t("Slug")),1),e("th",X,s(t.$t("Status")),1),e("th",G,s(t.$t("Actions")),1)])]),e("tbody",J,[(n(!0),i(w,null,S(l.services.data,a=>(n(),i("tr",{key:a.id},[e("td",K,s(a.title),1),e("td",Q,s(a.slug),1),e("td",W,[e("span",{class:$(a.isActive?"text-green-600":"text-red-600")},s(a.isActive?t.$t("Active"):t.$t("Inactive")),3)]),e("td",Y,[o(p,{href:t.route("dashboard.services.edit",a.slug),class:"text-blue-600 hover:text-blue-700"},{default:m(()=>[h(s(t.$t("Edit")),1)]),_:1},8,["href"])])]))),128))])]),l.services.data.length===0?(n(),i("div",Z,s(t.$t("No services found")),1)):y("",!0)]),e("div",ee,[o(g,{links:l.services.links},null,8,["links"])])])])}const be=I(j,[["render",te]]);export{be as default};
