import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{i as t}from"./common-utils-B6fqqa3X.mjs";import{load as n}from"cheerio";const r=`https://www.oesw.at`,i=`${r}/immobilienangebot/`,a={name:`Immobilienangebot`,example:`/oesw/sofort-verfuegbar/objectType=1&financingType=2&region=1020`,path:`*`,maintainers:[`sk22`],categories:[`other`],description:`Get your parameters on ${r} under "Immobilienangebot".
Make sure to remove the \`?\` at the beginning from the query parameters!`,async handler(a){let o=t(a).split(`/`),s=o[1]||`immobiliensuche`,c=o[2]||``;c.startsWith(`&`)&&(c=c.slice(1));let l=`${i}${s}.html?${c}`,u=n(await e(l));return{title:u(`title`).text(),language:`de`,logo:`https://www.oesw.at/fileadmin/Logos/OeSW_AG/OeSW-Logo2024-RGB.png`,allowEmpty:!0,item:u(`li[data-objlist-url] > a`).toArray().map(e=>{let t=u(e).find(`.boardPic > .count`).text().trim(),n=u(e).find(`.boardPic > .label`).toArray().map(e=>u(e).text().trim()).filter(e=>e.length),i=[e.attribs[`data-title2`].trim(),e.attribs[`data-title`].trim()].filter(e=>e.length),a=e.attribs[`data-largesrc`],o=a.startsWith(`/`)?r+a:a;return{guid:e.attribs.href+(t?`#count-${t}`:``),title:(t?`(${t}) `:``)+i.join(`, `),link:e.attribs.href,description:e.attribs[`data-description`],category:n,image:o,content:{html:e.attribs[`data-description-long`],text:e.attribs[`data-description-long`]}}}),link:l}}};export{a as route};