1import{_ as B}from"./WWy_r-EY.js";import{a9 as D,c as i,o as r,a as d,b as e,t as b,p as C,j as y,l,u as S,F as g,x as _,m as u,ah as N}from"#entry";import"./BsqTxom4.js";const O=D({__name:"StatusLabel",props:{ok:{type:Boolean},okText:{default:"OK"},failText:{default:"Error"}},setup(a){return(p,f)=>{const c=B;return r(),i("span",{class:C(["inline-flex items-center gap-1.5",a.ok?"text-green-600":"text-red-600"])},[d(c,{name:a.ok?"check-circle":"x-circle",size:"sm"},null,8,["name"]),e("span",null,b(a.ok?a.okText:a.failText),1)],2)}}}),j=Object.assign(O,{__name:"StatusLabel"}),F={class:"p-8"},E={class:"bg-white rounded-lg shadow p-6"},L={class:"space-y-2"},P={class:"font-medium"},K={class:"mt-6"},w={class:"space-y-2"},z={class:"font-medium"},$={class:"mt-6"},M=["disabled"],Z={__name:"test-firebase",setup(a){const{$firebase:p,$firestore:f,$firebaseAuth:c}=y(),s=N(),o=l(()=>({apiKey:s.public.firebaseApiKey,authDomain:s.public.firebaseAuthDomain,projectId:s.public.firebaseProjectId,storageBucket:s.public.firebaseStorageBucket,messagingSenderId:s.public.firebaseMessagingSenderId,appId:s.public.firebaseAppId})),v=l(()=>p),I=l(()=>f),k=l(()=>c),h=l(()=>[{label:"API Key",ok:!!o.value.apiKey,okText:"Definida"},{label:"Auth Domain",ok:!!o.value.authDomain,okText:o.value.authDomain},{label:"Project ID",ok:!!o.value.projectId,okText:o.value.projectId},{label:"Storage Bucket",ok:!!o.value.storageBucket,okText:o.value.storageBucket},{label:"Messaging Sender ID",ok:!!o.value.messagingSenderId,okText:o.value.messagingSenderId},{label:"App ID",ok:!!o.value.appId,okText:"Definida"}]),T=l(()=>[{label:"Firebase App",ok:!!v.value,okText:"Inicializado",failText:"NO INICIALIZADO"},{label:"Firestore",ok:!!I.value,okText:"Conectado",failText:"NO CONECTADO"},{label:"Auth",ok:!!k.value,okText:"Conectado",failText:"NO CONECTADO"}]),A=async()=>{try{console.log("𧪠Probando login..."),console.log("Auth object:",c),console.log("Config:",o.value)}catch(x){console.error("â Error en test:",x)}};return S({title:"Test Firebase - AutoPiezas360",meta:[{name:"robots",content:"noindex, nofollow"}]}),(x,n)=>{const m=j;return r(),i("div",F,[n[2]||(n[2]=e("h1",{class:"text-2xl font-bold mb-4"},"Test Firebase Configuration",-1)),e("div",E,[n[1]||(n[1]=e("h2",{class:"text-lg font-semibold mb-4"},"Configuración de Firebase:",-1)),e("div",L,[(r(!0),i(g,null,_(u(h),t=>(r(),i("div",{key:t.label,class:"flex items-center space-x-2"},[e("span",P,b(t.label)+":",1),d(m,{ok:t.ok,"ok-text":t.okText,"fail-text":"NO DEFINIDA"},null,8,["ok","ok-text"])]))),128))]),e("div",K,[n[0]||(n[0]=e("h3",{class:"font-semibold mb-2"},"Estado de los Servicios:",-1)),e("div",w,[(r(!0),i(g,null,_(u(T),t=>(r(),i("div",{key:t.label,class:"flex items-center space-x-2"},[e("span",z,b(t.label)+":",1),d(m,{ok:t.ok,"ok-text":t.okText,"fail-text":t.failText},null,8,["ok","ok-text","fail-text"])]))),128))])]),e("div",$,[e("button",{onClick:A,disabled:!u(k),class:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 disabled:bg-gray-400"}," Probar Login ",8,M)])])])}}};export{Z 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.