import{a}from"./rolldown-runtime-C_ttsnZz.js";import{St as e,q as r}from"./index-BT8Vuu3B.js";import{t as n}from"./neighborhood-fallback-CizB5oi9.js";var o=(a,e,r)=>{if(!e)return;let n="en"===a?e.name_en:e.name_fr;return r?.name?.value&&(n=r.name.value),{geogId:e.geog_id,level:e.level,name:n,countryCode:e.country_code,subCountryCode:e.sub_country_code,imageUrl:r?.image_url.value,summary:r?.summary.value}},t={AL:"Alabama",AK:"Alaska",AZ:"Arizona",AR:"Arkansas",CA:"California",CZ:"Canal Zone",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District of Columbia",FL:"Florida",GA:"Georgia",GU:"Guam",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PA:"Pennsylvania",PR:"Puerto Rico",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VI:"Virgin Islands",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming",AB:"Alberta",BC:"British Columbia",MB:"Manitoba",NB:"New Brunswick",NL:"Newfoundland and Labrador",NT:"Northwest Territories",NS:"Nova Scotia",NU:"Nunavut",ON:"Ontario",PE:"Prince Edward Island",QC:"Quebec",SK:"Saskatchewan",YT:"Yukon"};function i(a,e,r){const n=e;return a.replace("{geogId}",n.geogId).replace("{stateCode}",n.subCountryCode).replace("{stateName}",t[n.subCountryCode].replace(/\s+/g,r)).replace("{name}",n.name.replace(/\s+/g,r))}var s=a(e(),1),l=r();function d({isFeatured:a=!1,neighborhood:e,href:r}){const n=(0,s.useMemo)(()=>e?.imageUrl||"/sdks-app/v1/assets/neighborhood-fallback-DTJDTD7d.jpg",[e?.imageUrl]);return(0,l.jsx)("div",{className:"\n  group\n  data-[is-clickable]:hover:cursor-pointer\n","data-is-featured":a,"data-is-clickable":!!r,children:(0,l.jsxs)("a",{href:r,target:"_parent",rel:"noreferrer",children:[(0,l.jsx)("div",{className:"\n  relative rounded-t-lg\n  border border-solid border-gray-200 \n  duration-200\n  transition-colors\n  h-28 group-data-[is-featured=true]:h-60\n  group-data-[is-clickable=true]:group-hover:border-ll-primary\n",children:(0,l.jsx)("img",{className:"\n  object-center object-cover rounded-t-lg h-full w-full\n",src:n,alt:e?.name})}),(0,l.jsxs)("div",{className:"\n  border border-solid border-gray-200\n  rounded-b-lg border-t-0\n  py-6 px-8\n  duration-200\n  transition-colors\n  group-data-[is-featured=false]:py-4\n  group-data-[is-clickable=true]:group-hover:border-ll-primary\n",children:[(0,l.jsx)("h2",{className:"\n  text-xl font-medium text-ll-on-surface my-0 \n  duration-200\n  transition-colors\n  group-data-[is-clickable=true]:group-hover:text-ll-primary\n  group-data-[is-featured=false]:text-center\n  group-data-[is-featured=true]:mb-2\n  group-data-[is-featured=false]:text-base\n",children:e?.name}),a&&(0,l.jsx)("p",{className:"text-md text-gray-500 m-0 line-clamp-3",children:e?.summary})]})]})})}export{i as n,o as r,d as t};
//# sourceMappingURL=NeighborhoodCard-yb09pi0D.js.map