PageSourceSearch

https://aibr.org/build/assets/NoticiaList-C4FKMApP.js

js aibr.org collected 2026-09-24 09:34:33 UTC 3,723 bytes, 1 lines download raw bytes

1import{r as o,W as g,j as e}from"./app-belrbPXN.js";import{ArticleList as j}from"./ArticleList-woF0y5u8.js";import v from"./TabUi-bJhvIaEp.js";import N from"./InputSearchUi-oheAYPrx.js";import{g as w}from"./fetch-vtGia4wt.js";import{Paginated as S}from"./Paginated-eG55k1b-.js";import"./ArticleListItem-vRmUH2s6.js";import"./Str-tMly82PG.js";import"./chunk-OFGZKCFR-6l-SjWzx.js";import"./chunk-3TAVD5Y3-JLEfvKNw.js";import"./chunk-6BQDBGF4-B566eCa_.js";import"./chunk-MCFSCOSB--WO4Tv9A.js";import"./SearchIcon-IcEPHXgu.js";import"./import-0kiaZdOS.js";import"./import-Ho6b8CK9.js";import"./real-module-p6qORkc6.js";import"./import-_-a0l05m.js";import"./index-taukuCH3.js";import"./use-force-update-VB-OXXUy.js";import"./chunk-BSXPKUBX-mpJVaeDf.js";import"./chunk-2PIR7DFM-PKNoTa34.js";import"./chunk-XHQUSKIE-9yTKuk0T.js";import"./import-Q-bWrGRz.js";import"./chunk-TC4QW7OA-U26paOyA.js";import"./import-p5sRK1qG.js";import"./import-1bjV9P8v.js";import"./chunk-M3MASYO7-ql8iGmnH.js";import"./ChevronIcon-AIKhNuKN.js";import"./chunk-TNTFQBEK-SFGRqfrY.js";const C=(m=[],t=[],c)=>w(m,t,c),te=m=>{const[t,c]=o.useState([]),[n,p]=o.useState(!1),l=o.useRef(),[i,d]=o.useState({desc:!0,asc:!1}),{data:a,setData:s,get:F}=g({name:"",order:"desc"}),{data:x,total:h}=m;o.useEffect(()=>{n?C({name:a.name},{updated_at:a.order},"backoffice.noticia.search").then(f=>c(f)):c([])},[a.name,a.order]);const u=r=>{r==="buscar"?(p(!n),i.asc&&s("order","asc")):r==="lo-mas-recientes"&&(s("name",""),s("order","desc"),p(!1))},b=()=>{s("order",l.current.value),d({desc:l.current.value==="desc",asc:l.current.value==="asc"})};return e.jsxs("section",{className:"mt-4 min-w-[300px] w-auto overflow-hidden md:mx-auto md:mb-0",children:[e.jsx("header",{className:"mx-6 md:mt-[2px] xl:mx-auto",children:e.jsx("div",{className:"mb-4 relative",children:e.jsx("div",{className:"flex flex-row",children:e.jsx("div",{className:" md:flex-75 ",children:e.jsx("div",{className:"flex flex-col md:flex-none",children:e.jsx("h1",{className:"text-black flex-75 mt-[10px] font-bold text-2xl md:text-4xl lg:text-5xl lg:leading-[46px]",children:"Noticias"})})})})})}),e.jsx("div",{className:"mx-6 lg:mt-[35px] lg2:w-[calc(100%-50px)] lg2:max-w-[1199px] lg2:mx-auto",children:e.jsxs("div",{className:"before:table before:clear-both",children:[e.jsx(v,{onSelectionChange:u}),e.jsxs("section",{className:"block pt-[15px] min-h-[460px] md:pt-[30px] before:table before:clear-both",children:[e.jsxs("div",{className:`${n?"":"hidden"} border-gray-300 mb-[18px] pb-[9px] md:pb-[20px] lg2:pb-[27px]`,children:[e.jsx("h2",{className:"border-0 h-[1px] m-[-1px] overflow-hidden p-0 absolute w-[1px]",children:"Buscar artículos"}),e.jsx(N,{onClear:()=>s("name",""),onChange:r=>s("name",r.target.value),value:a.name}),e.jsxs("h3",{className:"text-sm md:text-base",children:[(t==null?void 0:t.total)??h," resultados ordenados por",e.jsxs("div",{className:"inline-block relative",children:[e.jsx("label",{className:"border-0 h-[1px] m-[-1px] overflow-hidden p-0 absolute w-[1px]",children:"select sort order"}),e.jsxs("select",{className:"appearance-none bg-transparent border-0 rounded-none border-neutral-50 p-0 px-1 pr-7 text-gray-700 cursor-pointer font-bold text-sm focus:border-transparent",onChange:b,ref:l,children:[e.jsx("option",{selected:i.desc,value:"desc",children:"más recientes"}),e.jsx("option",{selected:i.asc,value:"asc",children:"más antiguos"})]})]})]})]}),e.jsxs("div",{className:"mb-[22px] relative ",children:[e.jsx(j,{items:(t==null?void 0:t.data)??x}),t.per_page>15&&e.jsx(S,{total:t==null?void 0:t.total,from:t==null?void 0:t.from,currentPage:t==null?void 0:t.current_page,lastPage:t==null?void 0:t.last_page})]})]})]})})]})};export{te as NoticiaList};

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.