import{S as b,_ as x}from"./AppLayout.vue_vue_type_script_setup_true_lang-C-UlPCqH.js";import{d as v,o as n,a,b as l,e as i,h as w,w as u,f as t,t as o,i as r,l as h,j as m,F as N}from"./app-D9-EssCM.js";import{A as D}from"./arrow-left-CdAVEsab.js";import"./index-CcjNLu6f.js";import"./index-CMWG4mbA.js";import"./useForwardExpose-MNmriUeS.js";import"./VisuallyHidden-DG35s1YI.js";import"./RovingFocusGroup-Diffidi3.js";import"./useArrowNavigation-C6Y-ieo6.js";import"./x-DwmBYYXD.js";import"./_plugin-vue_export-helper-DmjF0He4.js";const A={class:"flex min-h-[60vh] items-center justify-center p-4"},C={class:"max-w-md text-center"},j={class:"mx-auto mb-6 flex h-20 w-20 items-center justify-center rounded-full bg-red-100"},U={class:"mb-6 text-gray-600"},k={class:"flex flex-col gap-3 sm:flex-row sm:justify-center"},q={class:"mt-8 text-left"},S={class:"mt-2 rounded bg-gray-100 p-3 text-xs text-gray-600"},V={key:0},_={key:1},Q=v({__name:"PermissionDenied",props:{module:{},ability:{},message:{},user:{},requestedUrl:{}},setup(p){const d=p,f=s=>({customers:"Customers",users:"Users",groups:"Groups",contacts:"Contacts",products:"Products & Services",jobcards:"Jobcards",quotes:"Quotes",invoices:"Invoices"})[s]||s.charAt(0).toUpperCase()+s.slice(1),c=s=>({list:"view the list of",view:"view",create:"create",edit:"edit",delete:"delete",edit_completed:"edit completed",edit_salesperson:"edit salesperson"})[s]||s,g=f(d.module),y=c(d.ability);return(s,e)=>(n(),a(N,null,[l(i(w),{title:"Access Denied"}),l(x,null,{default:u(()=>[t("div",A,[t("div",C,[t("div",j,[l(i(b),{class:"h-10 w-10 text-red-600"})]),e[8]||(e[8]=t("h1",{class:"mb-4 text-2xl font-bold text-gray-900"},"Access Denied",-1)),t("p",U," You don't have permission to "+o(i(y))+" "+o(i(g))+". ",1),e[9]||(e[9]=t("div",{class:"mb-8 rounded-lg bg-yellow-50 border border-yellow-200 p-4"},[t("p",{class:"text-sm text-yellow-800"},[t("strong",null,"Need access?"),r(" Contact your administrator to request permission for this feature. ")])],-1)),t("div",k,[l(i(h),{href:"/dashboard",class:"inline-flex items-center justify-center rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"},{default:u(()=>[l(i(D),{class:"mr-2 h-4 w-4"}),e[1]||(e[1]=r(" Go to Dashboard ",-1))]),_:1}),t("button",{onClick:e[0]||(e[0]=B=>s.$inertia.reload()),class:"inline-flex items-center justify-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"}," Try Again ")]),t("details",q,[e[7]||(e[7]=t("summary",{class:"cursor-pointer text-sm text-gray-500 hover:text-gray-700"}," Technical Details ",-1)),t("div",S,[t("p",null,[e[2]||(e[2]=t("strong",null,"Module:",-1)),r(" "+o(s.module),1)]),t("p",null,[e[3]||(e[3]=t("strong",null,"Ability:",-1)),r(" "+o(s.ability),1)]),t("p",null,[e[4]||(e[4]=t("strong",null,"Message:",-1)),r(" "+o(s.message),1)]),s.requestedUrl?(n(),a("p",V,[e[5]||(e[5]=t("strong",null,"Requested URL:",-1)),r(" "+o(s.requestedUrl),1)])):m("",!0),s.user?(n(),a("p",_,[e[6]||(e[6]=t("strong",null,"User:",-1)),r(" "+o(s.user.name)+" ("+o(s.user.email)+")",1)])):m("",!0)])])])])]),_:1})],64))}});export{Q as default};
