1import{f as G,r as c,h as T,u as N,g as R,q as H,c as s,i as n,a as t,B,j as C,b as m,w as b,m as v,I as P,F as D,k as L,v as A,A as U,e as V,o as i,d,t as u,U as W,_ as E}from"#entry";import{u as K}from"./CI36eZX6.js";import{u as j}from"./Dy9pVEbO.js";import"./DKLWY9DJ.js";const $={class:"container mx-auto px-4 py-8"},J={class:"mb-8"},O={class:"flex justify-between items-start mb-4"},q={key:0},Y={key:1,class:"flex flex-wrap gap-2"},X={key:2},Q={key:3,class:"bg-muted px-6 py-3 rounded-lg"},Z={class:"bg-white rounded-lg shadow-sm border border-muted p-6 mb-8"},ee={class:"grid grid-cols-1 md:grid-cols-4 gap-4"},te=["value"],re={key:1,class:"bg-white rounded-lg shadow-md p-6 mb-8"},ae={class:"grid md:grid-cols-2 gap-6 items-center"},se={key:0,class:"rounded-lg overflow-hidden"},ie=["src","alt"],oe={key:2,class:"text-center py-12"},le={key:3,class:"text-center py-12"},ne={key:0,class:"mb-6"},de=["src","alt"],ue={key:1,class:"text-6xl mb-4"},ce={key:4,class:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6"},pe={key:0,class:"bg-primary text-dark px-3 py-1 text-sm font-semibold text-center"},fe={class:"h-48 bg-muted flex items-center justify-center"},me={key:1,class:"text-4xl text-secondary"},ge={class:"p-4"},he={class:"flex items-start justify-between mb-2"},be={class:"font-semibold text-dark text-lg line-clamp-2"},ve={key:0,class:"bg-accent text-white px-2 py-1 rounded text-xs font-semibold ml-2"},xe={class:"text-secondary text-sm mb-3 line-clamp-2"},ye={class:"space-y-1 text-sm text-secondary mb-3"},we={key:0,class:"flex items-center"},ke={key:1,class:"flex items-center"},Se={key:2,class:"flex items-center"},_e={class:"flex items-center justify-between"},Te={class:"text-2xl font-bold text-primary"},Be={key:0,class:"col-span-1 md:col-span-2 lg:col-span-3"},Ce=G({__name:"index",setup(Pe){const{fetchImageWithFallback:x}=K(),g=c(""),p=c(null),h=c(null);T(async()=>{try{const r=await x("puppy dog cute",{orientation:"landscape",width:1920,height:600});r&&(g.value=r.url)}catch{}try{const r=await x("dog breeder puppies",{orientation:"landscape",width:800,height:600});r&&(p.value=r)}catch{}try{const r=await x("cute dog",{orientation:"portrait",width:400,height:400});r&&(h.value=r)}catch{}});const M=N(),y=R();j({title:"Dog Classifieds â Find Puppies & Dogs for Sale in the UK",description:"Browse DogHealthy classifieds for puppies and dogs across the UK. Discover listings from responsible sellers, compare breeds and locations, and find your next family dog.",keywords:"dog classifieds UK, puppies for sale UK, dogs for sale, dog breeders UK, puppy listings, dog adoption UK, DogHealthy classifieds",path:"/classifieds"});const f=c([]),w=c(!0),o=c({breed:"",location:"",maxPrice:null,sortBy:"created_at"}),F=["Affenpinscher","Afghan Hound","Airedale Terrier","Akbash","Akita","Alaskan Malamute","American Bulldog","American Bully","American Eskimo Dog","American Foxhound","American Pit Bull Terrier","American Staffordshire Terrier","American Water Spaniel","Anatolian Shepherd Dog","Australian Cattle Dog","Australian Kelpie","Australian Shepherd","Australian Terrier","Basenji","Basset Hound","Beagle","Bearded Collie","Beauceron","Bedlington Terrier","Belgian Malinois","Belgian Sheepdog","Belgian Tervuren","Bernese Mountain Dog","Bichon Frise","Black and Tan Coonhound","Black Russian Terrier","Bloodhound","Bluetick Coonhound","Boerboel","Border Collie","Border Terrier","Borzoi","Boston Terrier","Bouvier des Flandres","Boxer","Boykin Spaniel","Briard","Brittany","Brussels Griffon","Bull Terrier","Bulldog","Bullmastiff","Cairn Terrier","Canaan Dog","Cane Corso","Cardigan Welsh Corgi","Catahoula Leopard Dog","Caucasian Shepherd Dog","Cavalier King Charles Spaniel","Chesapeake Bay Retriever","Chihuahua","Chinese Crested","Chinese Shar-Pei","Chinook","Chow Chow","Clumber Spaniel","Cocker Spaniel","Collie","Curly-Coated Retriever","Dachshund","Dalmatian","Dandie Dinmont Terrier","Doberman Pinscher","Dogue de Bordeaux","English Cocker Spaniel","English Setter","English Springer Spaniel","English Toy Spaniel","English Toy Terrier","Eurasier","Field Spaniel","Finnish Lapphund","Finnish Spitz","Flat-Coated Retriever","French Bulldog","German Pinscher","German Shepherd Dog","German Shorthaired Pointer","German Spitz","German Wirehaired Pointer","Giant Schnauzer","Glen of Imaal Terrier","Golden Retriever","Gordon Setter","Great Dane","Great Pyrenees","Greater Swiss Mountain Dog","Greyhound","Harrier","Havanese","Ibizan Hound","Icelandic Sheepdog","Irish Red and White Setter","Irish Setter","Irish Terrier","Irish Water Spaniel","Irish Wolfhound","Italian Greyhound","Jack Russell Terrier","Japanese Akita","Japanese Chin","Japanese Spitz","Keeshond","Kerry Blue Terrier","Komondor","Kuvasz","Labrador Retriever","Lagotto Romagnolo","Lakeland Terrier","Leonberger","Lhasa Apso","Lowchen","Maltese","Manchester Terrier","Mastiff","Miniature Bull Terrier","Miniature Pinscher","Miniature Schnauzer","Neapolitan Mastiff","Newfoundland","Norfolk Terrier","Norweg
1ian Buhund","Norwegian Elkhound","Norwegian Lundehund","Norwich Terrier","Nova Scotia Duck Tolling Retriever","Old English Sheepdog","Otterhound","Papillon","Parson Russell Terrier","Pekingese","Pembroke Welsh Corgi","Petit Basset Griffon Vendeen","Pharaoh Hound","Plott","Pointer","Polish Lowland Sheepdog","Pomeranian","Poodle (Miniature)","Poodle (Standard)","Poodle (Toy)","Portuguese Water Dog","Pug","Puli","Pumi","Pyrenean Shepherd","Rhodesian Ridgeback","Rottweiler","Russell Terrier","Saint Bernard","Saluki","Samoyed","Schipperke","Scottish Deerhound","Scottish Terrier","Sealyham Terrier","Shetland Sheepdog","Shiba Inu","Shih Tzu","Siberian Husky","Silky Terrier","Skye Terrier","Sloughi","Smooth Fox Terrier","Soft Coated Wheaten Terrier","Spinone Italiano","Staffordshire Bull Terrier","Standard Schnauzer","Sussex Spaniel","Swedish Vallhund","Tibetan Mastiff","Tibetan Spaniel","Tibetan Terrier","Toy Fox Terrier","Treeing Walker Coonhound","Vizsla","Weimaraner","Welsh Springer Spaniel","Welsh Terrier","West Highland White Terrier","Whippet","Wire Fox Terrier","Wirehaired Pointing Griffon","Xoloitzcuintli","Yorkshire Terrier","Other"];H(()=>{let r=f.value;switch(o.value.breed&&(r=r.filter(e=>e.breed?.toLowerCase().includes(o.value.breed.toLowerCase()))),o.value.location&&(r=r.filter(e=>e.location?.toLowerCase().includes(o.value.location.toLowerCase()))),o.value.maxPrice&&(r=r.filter(e=>e.price_gbp&&e.price_gbp<=o.value.maxPrice)),o.value.sortBy){case"price_asc":r.sort((e,l)=>(e.price_gbp||0)-(l.price_gbp||0));break;case"price_desc":r.sort((e,l)=>(l.price_gbp||0)-(e.price_gbp||0));break;case"featured":r.sort((e,l)=>e.is_featured&&!l.is_featured?-1:!e.is_featured&&l.is_featured?1:new Date(l.created_at).getTime()-new Date(e.created_at).getTime());break;default:r.sort((e,l)=>new Date(l.created_at).getTime()-new Date(e.created_at).getTime())}return r});const z=r=>r<4?`${r} week${r!==1?"s":""} old`:r<52?`${Math.floor(r/4)} month${Math.floor(r/4)!==1?"s":""} old`:`${Math.floor(r/52)} year${Math.floor(r/52)!==1?"s":""} old`,I=async()=>{try{w.value=!0;const{data:r,error:e}=await M.from("doghealthy_listings").select("*").eq("status","active").order("is_featured",{ascending:!1}).order("created_at",{ascending:!1});if(e)throw e;f.value=r||[]}catch(r){console.error("Error fetching listings:",r)}finally{w.value=!1}},k=()=>{};let S;const _=()=>{clearTimeout(S),S=setTimeout(k,500)};return T(async()=>{await y.initialize(),await I()}),(r,e)=>{const l=V;return i(),s("div",$,[g.value?(i(),s("div",{key:0,class:"relative h-64 bg-cover bg-center mb-8 rounded-lg overflow-hidden",style:B({backgroundImage:`url(${g.value})`})},[...e[4]||(e[4]=[t("div",{class:"absolute inset-0 bg-black opacity-40"},null,-1),t("div",{class:"relative max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-full flex items-center"},[t("div",null,[t("h1",{class:"text-4xl font-bold text-white mb-2"},"Dog Classifieds"),t("p",{class:"text-secondary text-xl text-white"},"Find your perfect companion from trusted breeders")])],-1)])],4)):n("",!0),t("div",J,[t("div",O,[g.value?n("",!0):(i(),s("div",q,[...e[5]||(e[5]=[t("h1",{class:"text-4xl font-bold text-dark mb-2"},"Dog Classifieds",-1),t("p",{class:"text-secondary text-lg"},"Find your perfect companion from trusted breeders. Browse listings from responsible breeders and find your new best friend.",-1)])])),C(y).isAuthenticated?(i(),s("div",Y,[m(l,{to:"/classifieds/my-listings",class:"bg-secondary hover:bg-dark text-white px-6 py-3 rounded-lg font-semibold transition-colors flex items-center gap-2"},{default:b(()=>[...e[6]||(e[6]=[t("i",{class:"bi bi-folder2-open"},null,-1),d(" My Listings ",-1)])]),_:1}),m(l,{to:"/classifieds/new",class:"bg-primary hover:bg-accent text-dark px-6 py-3 rounded-lg font-semibold transition-colors flex items-center gap-2"},{default:b(()=>[...e[7]||(e[7]=[t("i",{class:"bi bi-plus-lg"},null,-1),d(" Add Listing ",-1)])]),_:1})])):C(y).loading?(i(),s("div",Q,[...e[9]||(e[9]=[t("div",{class:"animate-pulse text-secondary"},"Loading...",-1)])])):(i(),s("div",X,[m(l,{to:"/auth/login",class:"bg-secondary hover:bg-dark text-white px-6 py-3 rounded-lg font-semibold transition-colors flex items-center gap-2"},{default:b(()=>
1[...e[8]||(e[8]=[t("i",{class:"bi bi-person-plus"},null,-1),d(" Login to Add Listing ",-1)])]),_:1})]))])]),t("div",Z,[t("div",ee,[t("div",null,[e[11]||(e[11]=t("label",{class:"block text-sm font-medium text-dark mb-2"},"Breed",-1)),v(t("select",{"onUpdate:modelValue":e[0]||(e[0]=a=>o.value.breed=a),onChange:k,class:"w-full border border-muted rounded-lg px-3 py-2 focus:ring-2 focus:ring-primary focus:border-primary"},[e[10]||(e[10]=t("option",{value:""},"All Breeds",-1)),(i(),s(D,null,L(F,a=>t("option",{key:a,value:a},u(a),9,te)),64))],544),[[P,o.value.breed]])]),t("div",null,[e[12]||(e[12]=t("label",{class:"block text-sm font-medium text-dark mb-2"},"Location",-1)),v(t("input",{"onUpdate:modelValue":e[1]||(e[1]=a=>o.value.location=a),onInput:_,type:"text",placeholder:"Enter location",class:"w-full border border-muted rounded-lg px-3 py-2 focus:ring-2 focus:ring-primary focus:border-primary"},null,544),[[A,o.value.location]])]),t("div",null,[e[13]||(e[13]=t("label",{class:"block text-sm font-medium text-dark mb-2"},"Max Price (£)",-1)),v(t("input",{"onUpdate:modelValue":e[2]||(e[2]=a=>o.value.maxPrice=a),onInput:_,type:"number",placeholder:"Any price",class:"w-full border border-muted rounded-lg px-3 py-2 focus:ring-2 focus:ring-primary focus:border-primary"},null,544),[[A,o.value.maxPrice]])]),t("div",null,[e[15]||(e[15]=t("label",{class:"block text-sm font-medium text-dark mb-2"},"Sort By",-1)),v(t("select",{"onUpdate:modelValue":e[3]||(e[3]=a=>o.value.sortBy=a),onChange:k,class:"w-full border border-muted rounded-lg px-3 py-2 focus:ring-2 focus:ring-primary focus:border-primary"},[...e[14]||(e[14]=[t("option",{value:"created_at"},"Newest First",-1),t("option",{value:"price_asc"},"Price: Low to High",-1),t("option",{value:"price_desc"},"Price: High to Low",-1),t("option",{value:"featured"},"Featured First",-1)])],544),[[P,o.value.sortBy]])])])]),p.value&&f.value.length>0?(i(),s("div",re,[t("div",ae,[p.value?(i(),s("div",se,[t("img",{src:p.value.url,alt:p.value.description||"Dog classifieds",class:"w-full h-auto object-cover"},null,8,ie)])):n("",!0),e[16]||(e[16]=U('<div data-v-d473bfc6><h2 class="text-2xl font-bold text-dark mb-3" data-v-d473bfc6>Finding Your Perfect Dog</h2><p class="text-secondary mb-3" data-v-d473bfc6> When looking for a new dog, it's important to find a responsible breeder who prioritizes the health and wellbeing of their dogs. Look for breeders who: </p><ul class="space-y-2 text-secondary" data-v-d473bfc6><li class="flex items-start" data-v-d473bfc6><svg class="w-5 h-5 text-green-500 mr-2 mt-0.5 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20" data-v-d473bfc6><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" data-v-d473bfc6></path></svg><span data-v-d473bfc6>Provide health certificates and genetic testing</span></li><li class="flex items-start" data-v-d473bfc6><svg class="w-5 h-5 text-green-500 mr-2 mt-0.5 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20" data-v-d473bfc6><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" data-v-d473bfc6></path></svg><span data-v-d473bfc6>Allow you to meet the puppy's parents</span></li><li class="flex items-start" data-v-d473bfc6><svg class="w-5 h-5 text-green-500 mr-2 mt-0.5 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20" data-v-d473bfc6><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" data-v-d473bfc6></path></svg><span data-v-d473bfc6>Offer ongoing support and advice</span></li><li class="flex items-start" data-v-d473bfc6><svg class="w-5 h-5 text-green-500 mr-2 mt-0.5 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20" data-v-d473bfc6><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd" data-v-d473bfc6></path></svg><span data-v-d473bfc6>Have clean, safe breeding facilities</span></li></ul></div>',1))])])):n("",!0),w.value?(i(),s("div",oe,[...e[17]||(e[17]=[t("div",{class:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto"},null,-1),t("p",{class:"text-secondary mt-4"},"Loading listings...",-1)])])):f.value.length===0?(i(),s("div",le,[h.value?(i(),s("div",ne,[t("img",{src:h.value.url,alt:h.value.description||"Dog",class:"w-48 h-48 mx-auto rounded-full object-cover"},null,8,de)])):(i(),s("div",ue,"ð")),e[18]||(e[18]=t("h3",{class:"text-xl font-semibold text-dark mb-2"},"No listings found",-1)),e[19]||(e[19]=t("p",{class:"text-secondary mb-2"},"Try adjusting your filters or check back later for new listings.",-1)),e[20]||(e[20]=t("p",{class:"text-sm text-gray-500"},"Responsible breeders care deeply about finding the right homes for their puppies. Take your time to find the perfect match for your family.",-1))])):(i(),s("div",ce,[(i(!0),s(D,null,L(f.value,(a,De)=>(i(),s("div",{key:a.id,class:"bg-white rounded-lg shadow-sm border border-muted overflow-hidden hover:shadow-md transition-shadow"},[a.is_featured?(i(),s("div",pe," â Featured ")):n("",!0),t("div",fe,[a.images&&a.images.length>0?(i(),s("div",{key:0,class:"w-full h-full bg-cover bg-center",style:B({backgroundImage:`url(${a.images[0]})`})},null,4)):(i(),s("div",me,"ð"))]),t("div",ge,[t("div",he,[t("h3",be,u(a.title),1),a.is_premium?(i(),s("span",ve,"Premium")):n("",!0)]),t("p",xe,u(a.description),1),t("div",ye,[a.breed?(i(),s("div",we,[e[21]||(e[21]=t("i",{class:"bi bi-tag mr-2"},null,-1)),d(" "+u(a.breed),1)])):n("",!0),a.age_weeks?(i(),s("div",ke,[e[22]||(e[22]=t("i",{class:"bi bi-calendar mr-2"},null,-1)),d(" "+u(z(a.age_weeks)),1)])):n("",!0),a.location?(i(),s("div",Se,[e[23]||(e[23]=t("i",{class:"bi bi-geo-alt mr-2"},null,-1)),d(" "+u(a.location),1)])):n("",!0)]),t("div",_e,[t("div",Te," £"+u(a.price_gbp?.toFixed(2)||"Contact"),1),m(l,{to:`/classifieds/${a.id}`,class:"bg-primary hover:bg-accent text-dark px-4 py-2 rounded-lg font-semibold transition-colors"},{default:b(()=>[...e[24]||(e[24]=[d(" View Details ",-1)])]),_:1},8,["to"])])])]))),128)),(r.index+1)%5===0?(i(),s("div",Be,[m(W,{"ad-slot":"classifieds-listings","ad-format":"horizontal","class-name":"my-4"})])):n("",!0)]))])}}}),ze=E(Ce,[["__scopeId","data-v-d473bfc6"]]);export{ze 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.