import{a as e,b as r,h as t,j as i,q as o,_ as s}from"./server.mjs";import{m as a}from"./carCard-BmOv0Cuo.mjs";import{i as l}from"./loading-CegsFr7T.mjs";import{ref as f,withAsyncContext as d,watch as n,mergeProps as m,unref as p,withCtx as c,createTextVNode as v,toDisplayString as u,useSSRContext as h}from"vue";import{ssrRenderAttrs as g,ssrRenderComponent as w,ssrInterpolate as x,ssrRenderAttr as O,ssrRenderList as $}from"vue/server-renderer";import{L as j}from"./offers-Coy3s0gY.mjs";import{G as k}from"./seo-DYoMt0L4.mjs";import"../_/nitro.mjs";import"node:http";import"node:https";import"nitropack/dist/runtime/plugin";import"packrup";import"node:fs";import"node:url";import"consola/core";import"node:path";import"unhead";import"@unhead/shared";import"vue-router";import"pinia";import"axios";import"./NuxtImg-CUgs9eQf.mjs";import"./riyal-BwoU6xRW.mjs";import"./car-BMObURKw.mjs";const y={__name:"[slug]",__ssrInlineRender:!0,async setup(h){var y;let B,b;const C=e(),{locale:_}=r(),D=t(),S=f(D.params.slug);i();let L=j();[B,b]=d((()=>L.getOfferBySlug(S.value))),await B,b();let A=f(L.offer),M=f(!1);(null==(y=L.offer)?void 0:y.Offers)||o(C("/offers"),{redirectCode:301});const{setPageSeo:R}=k();return n((()=>L.offer),(e=>{if(e&&e.Offers){const r={"@context":"https://schema.org","@type":"Offer",name:e.Offers.title||("ar"===_.value?"عرض خاص":"Special Offer"),description:e.Offers.description||("ar"===_.value?"عرض خاص على السيارات في خليج أوتو":"Special offer on cars at Khalej Auto"),seller:{"@type":"Organization",name:"khalej Auto"},url:`https://khalejauto.sa/offers/${S.value}`,image:e.Offers.image||void 0};R({title:`${e.Offers.title||("ar"===_.value?"عرض خاص":"Special Offer")} - خليج أوتو`,path:`/offers/${S.value}`,image:e.Offers.image||void 0,type:"product",additionalSchemas:[r]})}}),{immediate:!0}),n((()=>L.offer),(e=>{A.value=e})),(e,r,t,i)=>{var o,f,d;const n=s,h=a,j=l;r(`<div${g(m({style:{"min-height":"100vh"}},i))}>`),p(A)?(r('<div class="container offer-page"><div class="text-page"><nav class="breadline" aria-label="Breadcrumb">'),r(w(n,{to:"/"},{default:c(((r,t,i,o)=>{if(!t)return[v(u(e.$t("home")),1)];t(`${x(e.$t("home"))}`)})),_:1},t)),r('<svg class="arrowDir" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M9.99998 13.28L5.65331 8.9333C5.13998 8.41997 5.13998 7.57997 5.65331 7.06664L9.99998 2.71997" stroke="#A7B9D0" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path></svg>'),r(w(n,{to:"/offers"},{default:c(((r,t,i,o)=>{if(!t)return[v(u(e.$t("offers")),1)];t(`${x(e.$t("offers"))}`)})),_:1},t)),r(`<svg class="arrowDir" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><path d="M9.99998 13.28L5.65331 8.9333C5.13998 8.41997 5.13998 7.57997 5.65331 7.06664L9.99998 2.71997" stroke="#A7B9D0" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="fw-bold" aria-current="page">${x(p(A).Offers.title)}</span></nav><div><h1 class="title mobileHead">${x(p(A).Offers.title)}</h1><svg xmlns="http://www.w3.org/2000/svg" width="150" height="3" viewBox="0 0 50 3" fill="none"><rect x="11.9048" width="78.0952" height="3.00022" rx="1.50011" fill="#2D9596"></rect><rect opacity="0.9" width="5.14286" height="3.00022" rx="1.50011" fill="#2D9596"></rect></svg></div></div><div class="main-offer-img"><img${O("src",p(A).Offers.cover)}${O("alt",p(A).Offers.title||"Offer details")} loading="lazy"></div><div class="mb-5">${null!=(d=null==(f=null==(o=p(A))?void 0:o.Offers)?void 0:f.description)?d:""}</div><div class="cars"><div class="head"><h5 class="">${x(e.$t("carOffer"))}</h5></div><div class="row">\x3c!--[--\x3e`),$(p(A).Offers.car,(e=>{r('<div class="col-12 col-xl-3 col-lg-3 col-md-6 my-3">'),r(w(h,{item:e},null,t)),r("</div>")})),r("\x3c!--]--\x3e</div></div></div>")):r("\x3c!----\x3e"),p(M)?r(w(j,null,null,t)):r("\x3c!----\x3e"),r("</div>")}}},B=y.setup;y.setup=(e,r)=>{const t=h();return(t.modules||(t.modules=new Set)).add("pages/offers/[slug].vue"),B?B(e,r):void 0};export{y as default};
