{% set seo_title = title|default(title_key|trans(title_parameters|default({}), 'meta')) %}
{% set seo_description = description|default(description_key|trans(description_parameters|default({}), 'meta')) %}
{% set localizedRoutes = localized_page_routes() %}
{% set canonicalUrl = localizedRoutes.current.absoluteUrl|default(app.request.uri) %}
{% set business_name = contact_business_name() %}
{% set seo_image_url = seo_image_url|default(absolute_url(asset('images/logo-meta.jpg'))) %}
{% set seo_image_type = seo_image_type|default('image/jpeg') %}
{% set seo_image_width = seo_image_width|default(600) %}
{% set seo_image_height = seo_image_height|default(450) %}
{% set seo_image_alt = seo_image_alt|default(business_name ?: seo_title) %}

<link rel="apple-touch-icon" sizes="180x180" href="{{ asset('images/favicon/apple-touch-icon.png') }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ asset('images/favicon/favicon-32x32.png') }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('images/favicon/favicon-16x16.png') }}">
<link rel="canonical" href="{{ canonicalUrl }}">
{% for localizedRoute in localizedRoutes.routes %}
    <link rel="alternate" hreflang="{{ localizedRoute.hreflang }}" href="{{ localizedRoute.absoluteUrl }}">
{% endfor %}
{% if localizedRoutes.default %}
    <link rel="alternate" hreflang="x-default" href="{{ localizedRoutes.default.absoluteUrl }}">
{% endif %}
<meta name="robots" content="{{ robots|default('index,follow') }}">
<meta name="description" lang="{{ app.request.locale }}" content="{{ seo_description }}">
<meta property="og:site_name" content="{{ business_name ?: seo_title }}">
<meta property="og:title" content="{{ seo_title }}">
<meta property="og:type" content="{{ og_type|default('website') }}">
<meta property="og:url" content="{{ canonicalUrl }}">
<meta property="og:image" content="{{ seo_image_url }}">
{% if localizedRoutes.current and localizedRoutes.current.openGraphLocale %}
    <meta property="og:locale" content="{{ localizedRoutes.current.openGraphLocale }}">
{% endif %}
{% for localizedRoute in localizedRoutes.routes %}
    {% if localizedRoute.locale != localizedRoutes.currentLocale and localizedRoute.openGraphLocale %}
        <meta property="og:locale:alternate" content="{{ localizedRoute.openGraphLocale }}">
    {% endif %}
{% endfor %}
<meta property="og:image:type" content="{{ seo_image_type }}">
<meta property="og:image:width" content="{{ seo_image_width }}">
<meta property="og:image:height" content="{{ seo_image_height }}">
<meta property="og:image:alt" content="{{ seo_image_alt }}">
<meta property="og:description" content="{{ seo_description }}">
<meta name="twitter:card" content="{{ twitter_card|default('summary_large_image') }}">
<meta name="twitter:title" content="{{ seo_title }}">
<meta name="twitter:description" content="{{ seo_description }}">
<meta name="twitter:image" content="{{ seo_image_url }}">
<meta name="twitter:image:alt" content="{{ seo_image_alt }}">
