{"version":3,"file":"PageStructuredData.BsIPDQFX.mjs","names":["useState","useCallback","useMemo"],"sources":["https:/framerusercontent.com/modules/cnHJp2b9hpUF9f02Xaff/HEFTa1aplHlUK9LkBWqA/PageStructuredData.js"],"sourcesContent":["import{jsx as _jsx}from\"react/jsx-runtime\";import{useCallback,useEffect,useMemo,useState,startTransition}from\"react\";import{addPropertyControls,ControlType,useIsStaticRenderer}from\"framer\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n */export default function PageStructuredData(props){const{pageKind,pageName,description,breadcrumbLabel,canonicalUrl,hotelName,telephone,email,streetAddress,addressLocality,addressRegion,postalCode,addressCountry,entityName,entityDescription,maximumAttendeeCapacity}=props;const canonicalOrigin=\"https://celiloinn.com\";const canonicalHotelId=\"https://celiloinn.com/#hotel\";const isStatic=useIsStaticRenderer();const[runtimePathname,setRuntimePathname]=useState(\"\");const normalizeUrl=useCallback(value=>{const trimmed=(value||\"\").trim();if(!trimmed)return\"\";try{const parsed=new URL(trimmed);const pathname=parsed.pathname.replace(/\\/$/,\"\");return`${canonicalOrigin}${pathname||\"\"}`;}catch(_error){if(typeof window!==\"undefined\"&&window.location?.pathname){try{const relative=new URL(trimmed,canonicalOrigin);const pathname=relative.pathname.replace(/\\/$/,\"\");return`${canonicalOrigin}${pathname||\"\"}`;}catch(_secondError){return\"\";}}return\"\";}},[canonicalOrigin]);useEffect(()=>{if(isStatic)return;if((canonicalUrl||\"\").trim())return;if(typeof window!==\"undefined\"&&window.location?.pathname){const resolved=window.location.pathname||\"/\";startTransition(()=>{setRuntimePathname(resolved);});}},[canonicalUrl,isStatic]);const resolvedPageUrl=useMemo(()=>{const canonical=normalizeUrl(canonicalUrl||\"\");if(canonical)return canonical;const path=(runtimePathname||\"\").trim();if(!path)return\"\";return normalizeUrl(`${canonicalOrigin}${path.startsWith(\"/\")?path:`/${path}`}`);},[canonicalUrl,runtimePathname,normalizeUrl,canonicalOrigin]);const pageSchemaType=useMemo(()=>{if(pageKind===\"about\")return\"AboutPage\";if(pageKind===\"rooms\")return\"CollectionPage\";if(pageKind===\"contact\")return\"ContactPage\";if(pageKind===\"adventures\")return\"CollectionPage\";return\"WebPage\";},[pageKind]);const schema=useMemo(()=>{const graph=[];const pageNode={\"@type\":pageSchemaType,name:(pageName||\"\").trim(),description:(description||\"\").trim()};if(resolvedPageUrl){pageNode.url=resolvedPageUrl;pageNode[\"@id\"]=`${resolvedPageUrl}#page`;}pageNode.about={\"@id\":canonicalHotelId};if(pageKind===\"services\"){const serviceNode={\"@type\":\"Service\",serviceType:\"Wedding and event venue services\",name:(entityName||\"\").trim()||\"Wedding and event venue services\",description:(entityDescription||\"\").trim(),areaServed:{\"@type\":\"Place\",name:\"The Dalles, Oregon\"}};serviceNode.provider={\"@id\":canonicalHotelId};pageNode.mainEntity=serviceNode;}if(pageKind===\"events\"){const placeNode={\"@type\":\"Place\",name:(entityName||\"\").trim(),description:(entityDescription||\"\").trim()};placeNode.containedInPlace={\"@id\":canonicalHotelId};if(maximumAttendeeCapacity>0){placeNode.maximumAttendeeCapacity=maximumAttendeeCapacity;}pageNode.mainEntity=placeNode;}if(pageKind===\"adventures\"){pageNode.mainEntity={\"@type\":\"TouristDestination\",name:(entityName||\"\").trim(),description:(entityDescription||\"\").trim(),touristType:[\"Hiking\",\"Paddling\",\"Biking\",\"Wineries and Breweries\",\"Fishing\",\"Windsurfing and Kiteboarding\",\"Shopping\",\"Sightseeing\"]};}if(pageKind===\"contact\"){pageNode.contactPoint={\"@type\":\"ContactPoint\",contactType:\"customer service\",telephone:(telephone||\"\").trim(),email:(email||\"\").trim(),areaServed:\"US\"};pageNode.mainEntity={\"@id\":canonicalHotelId};}graph.push(pageNode);if(resolvedPageUrl){graph.push({\"@type\":\"BreadcrumbList\",itemListElement:[{\"@type\":\"ListItem\",position:1,name:\"Home\",item:`${canonicalOrigin}/`},{\"@type\":\"ListItem\",position:2,name:(breadcrumbLabel||\"\").trim()||(pageName||\"\").trim(),item:resolvedPageUrl}]});}return{\"@context\":\"https://schema.org\",\"@graph\":graph};},[canonicalOrigin,canonicalHotelId,hotelName,pageKind,telephone,email,streetAddress,addressLocality,addressRegion,postalCode,addressCountry,pageSchemaType,pageName,description,resolvedPageUrl,entityName,entityDescription,maximumAttendeeCapacity,breadcrumbLabel]);const serializedSchema=useMemo(()=>{return JSON.stringify(schema).replace(/</g,\"\\\\u003c\");},[schema]);return /*#__PURE__*/_jsx(\"script\",{type:\"application/ld+json\",dangerouslySetInnerHTML:{__html:serializedSchema}});}PageStructuredData.displayName=\"Page Structured Data\";addPropertyControls(PageStructuredData,{pageKind:{type:ControlType.Enum,title:\"Page Kind\",defaultValue:\"about\",options:[\"about\",\"rooms\",\"services\",\"events\",\"contact\",\"adventures\"],optionTitles:[\"About\",\"Rooms\",\"Services\",\"Events\",\"Contact\",\"Adventures\"]},pageName:{type:ControlType.String,title:\"Page Name\",defaultValue:\"About Celilo Inn\"},description:{type:ControlType.String,title:\"Description\",displayTextArea:true,defaultValue:\"Learn more about Celilo Inn in The Dalles, Oregon.\"},breadcrumbLabel:{type:ControlType.String,title:\"Breadcrumb\",defaultValue:\"About\"},canonicalUrl:{type:ControlType.Link,title:\"Canonical URL\",defaultValue:\"\"},hotelName:{type:ControlType.String,title:\"Hotel Name\",defaultValue:\"Celilo Inn\"},telephone:{type:ControlType.String,title:\"Phone\",defaultValue:\"+1-541-769-0006\"},email:{type:ControlType.String,title:\"Email\",defaultValue:\"info@celiloinn.com\"},streetAddress:{type:ControlType.String,title:\"Street\",defaultValue:\"3550 E 2nd St\"},addressLocality:{type:ControlType.String,title:\"City\",defaultValue:\"The Dalles\"},addressRegion:{type:ControlType.String,title:\"Region\",defaultValue:\"OR\"},postalCode:{type:ControlType.String,title:\"Postal\",defaultValue:\"97058\"},addressCountry:{type:ControlType.String,title:\"Country\",defaultValue:\"US\"},entityName:{type:ControlType.String,title:\"Entity Name\",defaultValue:\"Celilo Inn Events\"},entityDescription:{type:ControlType.String,title:\"Entity Desc\",displayTextArea:true,defaultValue:\"Flexible event-friendly spaces near the Columbia River Gorge.\"},maximumAttendeeCapacity:{type:ControlType.Number,title:\"Max Capacity\",defaultValue:200,min:0,max:1e4,step:1}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"PageStructuredData\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"fixed\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./PageStructuredData.map"],"mappings":"uNAGG,SAAwB,EAAmB,EAAM,CAAC,GAAK,CAAC,WAAS,WAAS,cAAY,kBAAgB,eAAa,YAAU,YAAU,QAAM,gBAAc,kBAAgB,gBAAc,aAAW,iBAAe,aAAW,oBAAkB,2BAAyB,EAAY,EAAgB,wBAA8B,EAAiB,+BAAqC,EAAS,EAAoB,EAAO,CAAC,EAAgB,GAAoBA,EAAS,EAAE,EAAQ,EAAaC,EAAY,GAAO,CAAC,IAAM,GAAS,GAAO,GAAA,CAAI,KAAK,EAAE,GAAG,CAAC,EAAQ,MAAM,GAAG,GAAG,CAA+B,IAAM,EAAS,IAA5B,IAAI,CAA6B,CAAC,CAAC,SAAS,QAAQ,MAAM,EAAE,EAAE,MAAM,GAAG,IAAkB,GAAU,IAAK,MAAc,CAAC,GAAU,IAAS,QAAa,EAAO,UAAU,SAAU,GAAG,CAAiD,IAAM,EAAS,IAA5C,IAAI,EAAQ,CAAuC,CAAC,CAAC,SAAS,QAAQ,MAAM,EAAE,EAAE,MAAM,GAAG,IAAkB,GAAU,IAAK,MAAoB,CAAC,MAAM,EAAG,CAAE,MAAM,EAAG,CAAC,EAAE,CAAC,CAAe,CAAC,EAAE,MAAc,CAAI,OAAgB,EAAI,GAAc,GAAA,CAAI,KAAK,GAAmB,IAAS,QAAa,EAAO,UAAU,SAAS,CAAC,IAAM,EAAS,EAAO,SAAS,UAAU,IAAI,MAA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