import{a as j,b as I,h as P,j as z,q as M,_ as T}from"../server.mjs";import{_ as q}from"./carCard-BmOv0Cuo.js";import{_ as H}from"./loading-CegsFr7T.js";import{ref as u,withAsyncContext as K,watch as h,mergeProps as N,unref as o,withCtx as w,createTextVNode as $,toDisplayString as _,useSSRContext as V}from"vue";import{ssrRenderAttrs as E,ssrRenderComponent as d,ssrInterpolate as l,ssrRenderAttr as x,ssrRenderList as F}from"vue/server-renderer";import{u as G}from"./offers-Coy3s0gY.js";import{u as J}from"./seo-DYoMt0L4.js";import"ofetch";import"#internal/nuxt/paths";import"hookable";import"unctx";import"h3";import"unhead";import"@unhead/shared";import"vue-router";import"radix3";import"defu";import"klona";import"cookie-es";import"destr";import"ohash";import"@vue/devtools-api";import"pinia";import"axios";import"./NuxtImg-CUgs9eQf.js";import"./riyal-BwoU6xRW.js";import"./car-BMObURKw.js";const k={__name:"[slug]",__ssrInlineRender:!0,async setup(g){let n,i;const S=j(),{locale:m}=I(),y=P(),c=u(y.params.slug);z();let s=G();[n,i]=K(()=>s.getOfferBySlug(c.value)),await n,i();let r=u(s.offer),C=u(!1);s.offer?.Offers||M(S("/offers"),{redirectCode:301});const{setPageSeo:R}=J();return h(()=>s.offer,t=>{if(t&&t.Offers){const e={"@context":"https://schema.org","@type":"Offer",name:t.Offers.title||(m.value==="ar"?"عرض خاص":"Special Offer"),description:t.Offers.description||(m.value==="ar"?"عرض خاص على السيارات في خليج أوتو":"Special offer on cars at Khalej Auto"),seller:{"@type":"Organization",name:"khalej Auto"},url:`https://khalejauto.sa/offers/${c.value}`,image:t.Offers.image||void 0};R({title:`${t.Offers.title||(m.value==="ar"?"عرض خاص":"Special Offer")} - خليج أوتو`,path:`/offers/${c.value}`,image:t.Offers.image||void 0,type:"product",additionalSchemas:[e]})}},{immediate:!0}),h(()=>s.offer,t=>{r.value=t}),(t,e,f,b)=>{const v=T,A=q,B=H;e(`<div${E(N({style:{"min-height":"100vh"}},b))}>`),o(r)?(e('<div class="container offer-page"><div class="text-page"><nav class="breadline" aria-label="Breadcrumb">'),e(d(v,{to:"/"},{default:w((p,a,D,L)=>{if(a)a(`${l(t.$t("home"))}`);else return[$(_(t.$t("home")),1)]}),_:1},f)),e('<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>'),e(d(v,{to:"/offers"},{default:w((p,a,D,L)=>{if(a)a(`${l(t.$t("offers"))}`);else return[$(_(t.$t("offers")),1)]}),_:1},f)),e(`<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">${l(o(r).Offers.title)}</span></nav><div><h1 class="title mobileHead">${l(o(r).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${x("src",o(r).Offers.cover)}${x("alt",o(r).Offers.title||"Offer details")} loading="lazy"></div><div class="mb-5">${o(r)?.Offers?.description??""}</div><div class="cars"><div class="head"><h5 class="">${l(t.$t("carOffer"))}</h5></div><div class="row"><!--[-->`),F(o(r).Offers.car,p=>{e('<div class="col-12 col-xl-3 col-lg-3 col-md-6 my-3">'),e(d(A,{item:p},null,f)),e("</div>")}),e("<!--]--></div></div></div>")):e("<!---->"),o(C)?e(d(B,null,null,f)):e("<!---->"),e("</div>")}}},O=k.setup;k.setup=(g,n)=>{const i=V();return(i.modules||(i.modules=new Set)).add("pages/offers/[slug].vue"),O?O(g,n):void 0};export{k as default};
