// ============================================================
// Photo + placeholder components
// ============================================================
// Real image with placeholder fallback if it fails to load
function Photo({ src, alt, aspect = "wide", style, objectPosition }) {
const [errored, setErrored] = React.useState(false);
const aspectClass = {
wide: "ph-wide",
square: "ph-square",
tall: "ph-tall",
banner: "ph-banner",
}[aspect] || "ph-wide";
if (errored || !src) {
return ;
}
return (

setErrored(true)}
style={{
position: 'absolute', inset: 0,
width: '100%', height: '100%',
objectFit: 'cover',
objectPosition: objectPosition || 'center',
display: 'block',
}}
/>
);
}
// Striped placeholder for when a real image isn't available yet
function Ph({ label, aspect = "wide", style, children }) {
const aspectClass = {
wide: "ph-wide",
square: "ph-square",
tall: "ph-tall",
banner: "ph-banner",
}[aspect] || "ph-wide";
return (
{children}
{label && (
{label}
)}
);
}
// The combined brushstroke bee + "AUKLEND BIRØKT" wordmark
function Logo({ height = 220 }) {
const src = (typeof window !== 'undefined' && window.__resources && window.__resources['assets/logo-tittel.webp']) || 'assets/logo-tittel.webp';
return (
);
}
Object.assign(window, { Photo, Ph, Logo });