1import{f as u,p as m,r as g,t as f,D as x,Q as b,h as v,v as l,i as t,y as A,B as i,z as s,N as O,R as y,S as _,j as h,_ as C}from"./index-DYwMVYTK.js";import{u as V}from"./ProductCard-ChiO1MMh.js";import{A as E}from"./AppHeader-BRLi6AWo.js";import{A as T}from"./AppFooter-vfSXuPZT.js";import{_ as I,F as L,P}from"./ActiveFilters.vue_vue_type_script_setup_true_lang-C7VVTxMk.js";import"./BaseInput.vue_vue_type_script_setup_true_lang-BoxsNazD.js";const w={class:"catalog-view bg-gray-100",role:"main","aria-label":"Página de catálogo de livros"},G={"aria-label":"Cabeçalho do catálogo",class:"container flex flex-col sm:flex-row justify-between items-start sm:items-center py-4 mt-1 gap-3 px-4"},S={class:"sort-dropdown flex items-center gap-2",role:"group","aria-label":"Opções de ordenação"},k={class:"flex flex-col lg:flex-row gap-3"},W={"aria-label":"Filtros de produtos",class:"hidden lg:block lg:w-64 flex-shrink-0"},M={"aria-label":"Lista de produtos",class:"min-w-0 w-full flex-1"},F=u({__name:"CatalogView",setup(B){const n=x(),o=V(),{isPeraBook:a}=m(),c=g("relevance"),d=()=>{o.setSortBy(c.value)};return f(async()=>{c.value=o.filters.sortBy,console.log("[CATALOG VIEW] ========== COMPONENTE MONTADO =========="),console.log("[CATALOG VIEW] Store state:",{products:o.products.length,loading:o.loading,error:o.error});try{console.log("[CATALOG VIEW] Chamando loadProducts()..."),await o.loadProducts(),console.log("[CATALOG VIEW] â
loadProducts() concluÃdo"),console.log("[CATALOG VIEW] Produtos carregados:",o.products.length),console.log("[CATALOG VIEW] Produtos filtrados:",o.filteredProducts.length),o.products.length>0&&console.log("[CATALOG VIEW] Primeiros 3 produtos:",o.products.slice(0,3).map(e=>({id:e.id,title:e.title,price:e.price}))),n.query.author&&(console.log("[CATALOG VIEW] Aplicando filtro de autor:",n.query.author),o.setPeopleFilter(n.query.author))}catch(e){console.error("[CATALOG VIEW] â ERRO ao carregar produtos:",e),console.error("[CATALOG VIEW] â Stack:",e.stack)}console.log("[CATALOG VIEW] ========== FIM MONTAGEM ==========")}),b(()=>n.query.author,e=>{e?(console.log("[CATALOG VIEW] Filtro de autor mudou:",e),o.setPeopleFilter(e)):o.clearPeopleFilter()}),(e,r)=>(h(),v("div",w,[l(E),t("section",G,[t("h1",{id:"page-title",class:i(["page-title font-normal",s(a)?"text-xl sm:text-2xl":"text-2xl sm:text-3xl"]),style:A({color:s(a)?"#2D9B99":"#1E1D3D"})}," TODOS OS LIVROS : ",6),t("div",S,[t("label",{for:"sort-select",class:i(["whitespace-nowrap text-gray-700",(s(a),"text-xs sm:text-sm")]),"aria-label":"Ordenar produtos"}," Ordenar por: ",2),O(t("select",{id:"sort-select","onUpdate:modelValue":r[0]||(r[0]=p=>c.value=p),onChange:d,"aria-label":"Ordenar produtos por",class:i(["border border-gray-300 rounded-full focus:outline-none focus:ring-2 focus:ring-blue-500",s(a)?"px-2 py-1.5 text-xs sm:px-3 sm:py-2 sm:text-sm":"px-3 py-2 text-sm"])},[...r[1]||(r[1]=[_('<option value="relevance" data-v-2facd3b2>Mais relevantes</option><option value="price-asc" data-v-2facd3b2>Menor preço</option><option value="price-desc" data-v-2facd3b2>Maior preço</option><option value="bestseller" data-v-2facd3b2>Mais vendidos</option><option value="newest" data-v-2facd3b2>Lançamentos</option>',5)])],34),[[y,c.value]])])]),r[2]||(r[2]=t("div",{class:"border-t border-gray-300",role:"separator","aria-hidden":"true"},null,-1)),t("section",{"aria-label":"Filtros ativos",class:i(s(a)?"container py-1.5":"container py-2")},[l(I,{"is-perabook":s(a)},null,8,["is-perabook"])],2),t("main",{id:"main-content",class:i(["container pb-24 bg-gray-100 min-h-screen px-4 lg:px-6",s(a)?"pt-3 sm:pt-8":"pt-4 sm:pt-16"]),"aria-labelledby":"page-title"},[t("div",k,[t("aside",W,[l(L,{"is-perabook":s(a)},null,8,["is-perabook"])]),t("section",M,[l(P,{paginate:"","is-perabook":s(a)},null,8,["is-perabook"])])])],2),l(T)]))}}),H=C(F,[["__scopeId","data-v-2facd3b2"]]);export{H 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.