<?php

declare(strict_types=1);

/**
 * Turnen → Eltern-Kind- & Kinderturnen. Inhalt: data/turnen.json (disciplines.eltern-kind-turnen).
 * Bündelt Eltern-Kind-Gruppen und die nach Alter gestaffelten Kinderturn-Gruppen.
 * Struktur: Hero → Gruppen/Trainingszeiten → CTA.
 */
$slug = 'turnen/eltern-kind-turnen';
$data = json_load('turnen');
$d = $data['disciplines']['eltern-kind-turnen'];

$meta = [
    'title'       => 'Eltern-Kind- & Kinderturnen in Kulmbach',
    'description' => $d['hero']['text'],
    'og_image'    => 'img/pages/vereinsgelaende-1600.jpg',
    'scripts'     => ['group-tabs.js'],
    'schema'      => page_schema([
        ['name' => 'Startseite', 'slug' => ''],
        ['name' => 'Turnen', 'slug' => 'turnen'],
        ['name' => 'Eltern-Kind- & Kinderturnen', 'slug' => $slug],
    ]),
];

component('hero', ['hero' => $d['hero']]);
component('group-schedule', [
    'location' => $d['location'] ?? [],
    'lead'     => $d['lead'] ?? '',
    'notice'   => $d['notice'] ?? '',
    'groups'   => $d['groups'] ?? [],
    'footnote' => $data['footnote'] ?? '',
]);