'use client'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { useEffect, useRef, useState } from 'react'; import { Menu, X, ArrowUpLeft, Instagram, Mail, ArrowUp } from 'lucide-react'; import { navigation, offices, phones, emails, instagram } from '../lib/content'; import AccountMenu from './account-menu'; export function Brand({branding={},dark=false}) {const src=(dark?branding.logoDarkUrl:branding.logoUrl)||branding.logoUrl||'/Logo.png';return لوگوی ساناز گودرزیساناز گودرزی.ARCHITECTURE & INTERIOR DESIGN} export function Header({branding={}}) { const path=usePathname(); const [open,setOpen]=useState(false); const dialog=useRef(null); const trigger=useRef(null); useEffect(() => { const panel = dialog.current; if (!open && !panel.open) return; const previousOverflow = document.body.style.overflow; document.body.style.overflow = 'hidden'; if (open && !panel.open) panel.showModal(); panel.dataset.phase = open ? 'opening' : 'closing'; const reduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches; const animation = panel.animate( open ? [{ transform: 'translateX(100%)', opacity: .4 }, { transform: 'translateX(0)', opacity: 1 }] : [{ transform: 'translateX(0)', opacity: 1 }, { transform: 'translateX(100%)', opacity: 0 }], { duration: reduced ? 0 : open ? 440 : 260, easing: 'cubic-bezier(.22,1,.36,1)', fill: 'both' } ); animation.finished.then(() => { if (!open) { panel.close(); document.body.style.overflow = previousOverflow; trigger.current?.focus(); } }).catch(() => {}); return () => { animation.cancel(); document.body.style.overflow = previousOverflow; }; }, [open]); return <>
{event.preventDefault();setOpen(false)}} onClick={e=>{if(e.target===dialog.current)setOpen(false)}}>
{phones[0].label}
; } export function Footer({branding={}}) { const pathname = usePathname(); if (pathname === '/') return null; return }