import{B,o as t,c as i,m,y as o,s as C,E as I,I as R,F,G as A,J as g,b as D,S as L,L as p,W as k,X as M,u as y,v as w,ab as N,K as v,O as $,M as W}from"./CVN9mXi8.js";import{s as T}from"./BeiPJ-Ey.js";import{S as V}from"./ZIw2O0V5.js";var q=function(s){var n=s.dt;return`
.p-progressspinner {
    position: relative;
    margin: 0 auto;
    width: 100px;
    height: 100px;
    display: inline-block;
}

.p-progressspinner::before {
    content: "";
    display: block;
    padding-top: 100%;
}

.p-progressspinner-spin {
    height: 100%;
    transform-origin: center center;
    width: 100%;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    animation: p-progressspinner-rotate 2s linear infinite;
}

.p-progressspinner-circle {
    stroke-dasharray: 89, 200;
    stroke-dashoffset: 0;
    stroke: `.concat(n("progressspinner.color.1"),`;
    animation: p-progressspinner-dash 1.5s ease-in-out infinite, p-progressspinner-color 6s ease-in-out infinite;
    stroke-linecap: round;
}

@keyframes p-progressspinner-rotate {
    100% {
        transform: rotate(360deg);
    }
}
@keyframes p-progressspinner-dash {
    0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -35px;
    }
    100% {
        stroke-dasharray: 89, 200;
        stroke-dashoffset: -124px;
    }
}
@keyframes p-progressspinner-color {
    100%,
    0% {
        stroke: `).concat(n("progressspinner.color.1"),`;
    }
    40% {
        stroke: `).concat(n("progressspinner.color.2"),`;
    }
    66% {
        stroke: `).concat(n("progressspinner.color.3"),`;
    }
    80%,
    90% {
        stroke: `).concat(n("progressspinner.color.4"),`;
    }
}
`)},G={root:"p-progressspinner",spin:"p-progressspinner-spin",circle:"p-progressspinner-circle"},J=B.extend({name:"progressspinner",theme:q,classes:G}),K={name:"BaseProgressSpinner",extends:C,props:{strokeWidth:{type:String,default:"2"},fill:{type:String,default:"none"},animationDuration:{type:String,default:"2s"}},style:J,provide:function(){return{$pcProgressSpinner:this,$parentInstance:this}}},E={name:"ProgressSpinner",extends:K,inheritAttrs:!1,computed:{svgStyle:function(){return{"animation-duration":this.animationDuration}}}},O=["fill","stroke-width"];function U(e,s,n,h,a,l){return t(),i("div",m({class:e.cx("root"),role:"progressbar"},e.ptmi("root")),[(t(),i("svg",m({class:e.cx("spin"),viewBox:"25 25 50 50",style:l.svgStyle},e.ptm("spin")),[o("circle",m({class:e.cx("circle"),cx:"50",cy:"50",r:"20",fill:e.fill,"stroke-width":e.strokeWidth,strokeMiterlimit:"10"},e.ptm("circle")),null,16,O)],16))],16)}E.render=U;var H=function(s){var n=s.dt;return`
.p-skeleton {
    overflow: hidden;
    background: `.concat(n("skeleton.background"),`;
    border-radius: `).concat(n("skeleton.border.radius"),`;
}

.p-skeleton::after {
    content: "";
    animation: p-skeleton-animation 1.2s infinite;
    height: 100%;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transform: translateX(-100%);
    z-index: 1;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), `).concat(n("skeleton.animation.background"),`, rgba(255, 255, 255, 0));
}

[dir='rtl'] .p-skeleton::after {
    animation-name: p-skeleton-animation-rtl;
}

.p-skeleton-circle {
    border-radius: 50%;
}

.p-skeleton-animation-none::after {
    animation: none;
}

@keyframes p-skeleton-animation {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(100%);
    }
}

@keyframes p-skeleton-animation-rtl {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(-100%);
    }
}
`)},Q={root:{position:"relative"}},Y={root:function(s){var n=s.props;return["p-skeleton p-component",{"p-skeleton-circle":n.shape==="circle","p-skeleton-animation-none":n.animation==="none"}]}},Z=B.extend({name:"skeleton",theme:H,classes:Y,inlineStyles:Q}),ee={name:"BaseSkeleton",extends:C,props:{shape:{type:String,default:"rectangle"},size:{type:String,default:null},width:{type:String,default:"100%"},height:{type:String,default:"1rem"},borderRadius:{type:String,default:null},animation:{type:String,default:"wave"}},style:Z,provide:function(){return{$pcSkeleton:this,$parentInstance:this}}},P={name:"Skeleton",extends:ee,inheritAttrs:!1,computed:{containerStyle:function(){return this.size?{width:this.size,height:this.size,borderRadius:this.borderRadius}:{width:this.width,height:this.height,borderRadius:this.borderRadius}}}};function ne(e,s,n,h,a,l){return t(),i("div",m({class:e.cx("root"),style:[e.sx("root"),l.containerStyle],"aria-hidden":"true"},e.ptmi("root")),null,16)}P.render=ne;const te={class:"h-full px-[10%] py-8 flex gap-8 flex-wrap justify-center items-center overflow-y-auto"},re={class:"h-80 flex flex-col justify-around"},se={class:"grid-col-12 flex justify-center"},oe=["src","alt"],ae={class:"py-5 w-full text-center gap-2"},ie={class:"h-80 flex flex-col justify-around"},le=["src"],ce={class:"text-center mb-4"},ge=I({__name:"SelecaoEmpresa",setup(e){const s=R(),n=F(),h=A(),a=g([]),l=g(!1),u=g(),b=g("");D(()=>{b.value=n.background,j()});async function j(){l.value=!0,V.empresa.find().then(r=>{a.value=r,console.log("api.empresas ==> ",a.value),a.value.length===1?S(a.value[0]):n.empresas=a.value}).catch(r=>{console.error("Erro ao buscar empresas",r),s.add({severity:"error",summary:r,detail:"Erro ao buscar empresas"})}).finally(()=>{l.value=!1})}function S(r){u.value=r,h.empresaAtual=r,L("/")}function f(r){for(const d of n.logomarcas)if(d.empresa===r)return"data:image/png;base64,"+d.imagem}return(r,d)=>{const x=P,z=W,_=T,X=E;return t(),i("div",{class:"h-screen bg-fixed bg-cover bg-no-repeat bg-center",style:N({backgroundImage:"url("+p(b)+")"})},[o("div",te,[p(u)?(t(),y(_,{key:1,class:"w-60 text-neutral-950 rounded-lg bg-neutral-200"},{content:w(()=>[o("div",ie,[o("img",{src:f(p(u).sigla),class:"object-cover"},null,8,le),o("span",ce,$(p(u).nomeFantasia),1),v(X,{style:{width:"48px",height:"48px"},"stroke-width":"8",fill:"transparent","animation-duration":".5s","aria-label":"Custom ProgressSpinner"}),d[0]||(d[0]=o("span",{class:"text-center"},"Carregando...",-1))])]),_:1})):(t(!0),i(k,{key:0},M(p(a),c=>(t(),y(_,{key:c.id,class:"w-60 text-neutral-950 transition ease-in-out duration-300 hover:-translate-y-1 hover:text-white hover:bg-blue-100 rounded-lg bg-neutral-200 dark:hover:bg-neutral-800 cursor-pointer",onClick:()=>S(c)},{content:w(()=>[o("div",re,[p(l)?(t(),i(k,{key:0},[v(x,{shape:"circle",width:"100%",height:"auto",class:"aspect-square"}),v(x,{width:"100%",height:"1rem"})],64)):(t(),i(k,{key:1},[o("div",se,[f(c.sigla)?(t(),i("img",{key:0,src:f(c.sigla),class:"object-cover",alt:c.sigla},null,8,oe)):(t(),y(z,{key:1,src:"/logo-antt.png",alt:"sigescantt"}))]),o("span",ae,$(c.nomeFantasia),1)],64))])]),_:2},1032,["onClick"]))),128))])],4)}}});export{ge as default};
