import{b as v}from"./btnList.6c44b4ef.js";import{w as P,e as c,b as l,m as x,k as y,o as b,c as B,a as p,j as r,A as C,l as H,$ as A,a0 as N,_ as E,au as k}from"./index.4d3e3847.js";function S(e,t){const{powers:o,proPermissions:i}=P(),s=c(()=>o.get(e)||[]),n=c(()=>i.get(t)||[]);function m(a){const u=v.find(({name:g})=>a===g);return s.value.includes(u.code)}function h(a){return s.value.includes(a)}function f(a){return s.value.every(_=>a.includes(_))}return{permissions:s,proPermissions:n,hasPermissionWithName:m,hasPermissionWithCode:h,hasPermissionWithCodes:f}}const d=e=>(A("data-v-6be1f445"),e=e(),N(),e),w={class:"flex flex-col justify-center page-container"},F=d(()=>p("div",{class:"text-center"},null,-1)),I={class:"text-center"},W=d(()=>p("h1",{class:"text-base text-gray-500"},"\u62B1\u6B49\uFF0C\u4F60\u65E0\u6743\u8BBF\u95EE\u8BE5\u9875\u9762",-1)),V=l({__name:"no-auth",setup(e){const t=x();function o(){t.push("/")}return(i,s)=>{const n=y("el-button");return b(),B("div",w,[F,p("div",I,[W,r(n,{type:"primary",onClick:o},{default:C(()=>[H("\u56DE\u5230\u9996\u9875")]),_:1})])])}}});const j=E(V,[["__scopeId","data-v-6be1f445"]]);const $=l({name:"PageAuth",props:{pageName:{type:String},margin:{type:Boolean,default:!0}},setup(e,{slots:t}){const{permissions:o,hasPermissionWithCode:i}=S(e.pageName),s=c(()=>{const{margin:n}=e;return n?"":"auth__container--nomargin"});return k("Auth",{permissions:o}),()=>i("001")?r("div",{class:s.value},[t.default&&t.default()]):r(j,null,null)}}),R=$;export{R as P};
