<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">

<head>
    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=AW-17893851454"></script>
    <script>
        window.dataLayer = window.dataLayer || [];

        function gtag() {
            dataLayer.push(arguments);
        }
        gtag('js', new Date());

        gtag('config', 'AW-17893851454');
    </script>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    @php
        $supportedLocales = ['ro', 'ru', 'en', 'it'];
        $segments = request()->segments();
        if (in_array($segments[0] ?? '', $supportedLocales, true)) {
            array_shift($segments);
        }
        $path = implode('/', $segments);
    @endphp
    @foreach ($supportedLocales as $locale)
        <link rel="alternate" hreflang="{{ $locale }}" href="{{ url($locale . ($path ? '/' . $path : '')) }}">
    @endforeach
    <link rel="alternate" hreflang="x-default" href="{{ url('ro' . ($path ? '/' . $path : '')) }}">
    @php
        $ogTitle = trim($__env->yieldContent('title', config('app.name', 'Radiere SRL')));
        $ogDescription = trim(
            $__env->yieldContent(
                'meta_description',
                'Radiere SRL simplă, cu pași clari și suport de la început până la final.',
            ),
        );
        $pageUrl = trim($__env->yieldContent('canonical', url()->current()));
        $pageImage = trim($__env->yieldContent('og_image', asset('uploads/opengraph.png')));
        $imageAlt = trim($__env->yieldContent('og_image_alt', $ogTitle));
        $ogType = trim($__env->yieldContent('og_type', 'website'));
    @endphp
    <title>{{ $ogTitle }}</title>
    <meta name="description" content="{{ $ogDescription }}">
    <link rel="canonical" href="{{ $pageUrl }}">
    <meta property="og:title" content="{{ $ogTitle }}">
    <meta property="og:description" content="{{ $ogDescription }}">
    <meta property="og:image" content="{{ $pageImage }}">
    <meta property="og:image:alt" content="{{ $imageAlt }}">
    <meta property="og:url" content="{{ $pageUrl }}">
    <meta property="og:type" content="{{ $ogType }}">
    <meta property="og:site_name" content="{{ config('app.name', 'Radiere SRL') }}">
    <meta name="twitter:card" content="summary_large_image">
    <meta name="twitter:title" content="{{ $ogTitle }}">
    <meta name="twitter:description" content="{{ $ogDescription }}">
    <meta name="twitter:image" content="{{ $pageImage }}">
    <meta name="twitter:image:alt" content="{{ $imageAlt }}">
    <link rel="icon" href="{{ asset('uploads/radiere-logo.ico') }}" type="image/x-icon">
    <link rel="shortcut icon" href="{{ asset('uploads/radiere-logo.ico') }}" type="image/x-icon">
    <link rel="apple-touch-icon" sizes="180x180" href="{{ asset('uploads/radiere-logo.png') }}">
    <link rel="icon" type="image/svg+xml" href="{{ asset('uploads/radiere-logo.svg') }}">
    <link rel="icon" type="image/png" sizes="512x512" href="{{ asset('uploads/radiere-logo.png') }}">
    <link rel="icon" type="image/png" sizes="192x192" href="{{ asset('uploads/radiere-logo.png') }}">
    <link rel="icon" type="image/png" sizes="32x32" href="{{ asset('uploads/radiere-logo.png') }}">
    <link rel="icon" type="image/png" sizes="16x16" href="{{ asset('uploads/radiere-logo.png') }}">
    @stack('head')
    @vite(['resources/css/app.css', 'resources/js/app.js'])
    @hasSection('schema')
        <script type="application/ld+json">
                @yield('schema')
            </script>
    @endif
</head>

<body class="bg-slate-50 text-slate-900 antialiased overflow-x-hidden">
    <div class="min-h-screen">
        @yield('content')
    </div>
</body>

</html>
