import type { Metadata } from "next";
import { Inter } from "next/font/google";
import Header from "@/components/layout/Header";
import Footer from "@/components/layout/Footer";
import "./globals.css";

const inter = Inter({
  subsets: ["latin"],
  variable: "--font-inter",
  display: "swap",
});

export const metadata: Metadata = {
  metadataBase: new URL("https://www.telenetsystems.at"),
  title: {
    default: "TeleNetSystems | Internet, TV & Telefonie in Reutte, Tirol",
    template: "%s | TeleNetSystems",
  },
  description:
    "Ihr regionaler Partner für Internet, Fernsehen und Telefonie in Reutte und Tirol. Persönliche Beratung, stabile Technik, faire Preise.",
  keywords: [
    "Internet Reutte",
    "TV Anbieter Tirol",
    "Telefonie Reutte",
    "TeleNetSystems",
    "Internet Tirol",
    "Glasfaser Reutte",
  ],
  authors: [{ name: "TeleNetSystems" }],
  openGraph: {
    type: "website",
    locale: "de_AT",
    siteName: "TeleNetSystems",
    title: "TeleNetSystems | Internet, TV & Telefonie in Reutte, Tirol",
    description:
      "Ihr regionaler Partner für Internet, Fernsehen und Telefonie in Reutte und Tirol.",
    images: [
      {
        url: "/images/logo/logo-systems.png",
        width: 500,
        height: 200,
        alt: "TeleNetSystems Logo",
      },
    ],
  },
  icons: {
    icon: "/favicon.ico",
  },
};

const jsonLd = {
  "@context": "https://schema.org",
  "@type": "LocalBusiness",
  name: "TeleNetSystems",
  description:
    "Regionaler IT- und Telekommunikationsanbieter in Reutte, Tirol. Internet, Fernsehen und Telefonie für Privat- und Geschäftskunden.",
  address: {
    "@type": "PostalAddress",
    streetAddress: "Untermarkt 16",
    addressLocality: "Reutte",
    addressRegion: "Tirol",
    postalCode: "6600",
    addressCountry: "AT",
  },
  telephone: "+43 5672 21400",
  email: "info@telenetsystems.at",
  url: "https://www.telenetsystems.at",
  image: "/images/logo/logo-systems.png",
  areaServed: {
    "@type": "GeoCircle",
    geoMidpoint: {
      "@type": "GeoCoordinates",
      latitude: 47.4833,
      longitude: 10.7167,
    },
    geoRadius: "50000",
  },
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="de" className={inter.variable}>
      <head>
        <script
          type="application/ld+json"
          dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
        />
      </head>
      <body className="antialiased">
        <a
          href="#main-content"
          className="sr-only focus:not-sr-only focus:fixed focus:top-4 focus:left-4 focus:z-50 focus:rounded-lg focus:bg-primary-600 focus:px-4 focus:py-2 focus:text-white"
        >
          Zum Inhalt springen
        </a>
        <Header />
        <main id="main-content" className="pt-16 lg:pt-20">
          {children}
        </main>
        <Footer />
      </body>
    </html>
  );
}
