easy_admin:

    site_name: '<img src="%env(APP_BASE_URL)%/assets/img/dde_logo.jfif" />'

    translation_domain: 'admin'

    user:
        display_name: true
        name_property_path: 'email'

    formats:
        date: 'd.m.Y'
        datetime: 'd.m.Y@h:i'

    design:

        brand_color: '#8B1B10'

        menu:
            - { entity: 'Event', icon: 'calendar-day' }
            - { entity: 'EventVenue', icon: 'landmark' }

        assets:
            css:
                - 'assets/css/admin.css'
            js:
                - 'assets/js/admin.js'

    entities:
        # List the entity class name you want to manage
        Event:
            class: App\Entity\Event
            label: entity.label.events

            form:
                fields:
                    - { type: 'group', label: 'event.group.basic_information', css_class: 'col-md-8' }
                    - { property: 'title', label: 'event.title', css_class: 'col-md-6' }
                    - { property: 'category', label: 'event.category', type: 'choice', css_class: 'col-md-6', type_options: { choices: { 'Dachforum': 'Dachforum'}, placeholder: 'none' } }
                    - { property: 'email', label: 'event.email', css_class: 'col-md-6' }
                    - { property: 'max_attendees_number', label: 'event.max_attendees_number', type: 'choice', css_class: 'col-md-6', type_options: { choices: { 'unbegrenzt': 0, '1': 1, '2': 2, '3': 3, '4': 4}} }
                    - { property: 'description', type: 'text-editor', label: 'event.description' }
                    - { type: 'group', label: 'event.group.appointment', css_class: 'col-md-4' }
                    - { property:  'venue', label: 'event.venue', type: 'easyadmin_autocomplete', type_options: { class: 'App\Entity\EventVenue', required: true } }
                    - { property: 'start_date', label: 'event.start_date', type_options: { widget: 'single_text' } }
                    - { property: 'end_date', label: 'event.end_date', type_options: { widget: 'single_text' } }
                    - { property: 'available_until', label: 'event.available_until', type_options: { widget: 'single_text' } }
                    - { type: 'group', label: 'event.group.event_image', css_class: 'col-md-8' }
                    - { property: 'imageFile', label: 'event.event_image', type: 'vich_image', base_path: '%app.path.event_images%' }
            list:

                fields:
                    - { property: 'title', label: 'event.title' }
                    - { property: 'start_date', label: 'event.start_date', type_options: { html5: true } }
                    - { property: 'end_date', label: 'event.end_date', type_options: { html5: true } }
                    - { property: 'venue', label: 'event.venue' }
                    - { property: 'attendee_count', label: 'event.attendee_count' }

                collapse_actions: true

                actions:
                    - { name: 'event_redirect_by_id', label: 'action.event_redirect_by_id', type: 'route', icon: 'eye', target: '_blank' }
                    - { name: 'event_attendee_list_view', label: 'action.event_attendee_list_view', type: 'route', icon: 'users', target: '' }
                    - { name: 'edit', icon: 'pen' }
                    - { name: 'delete', icon: 'minus-circle' }


        EventVenue:
            class: App\Entity\EventVenue
            label: entity.label.event_venues

            form:
                fields:
                    - { property: 'name', label: 'event_venue.name' }
                    - { property: 'zipCode', label: 'event_venue.zip_code' }
                    - { property: 'city', label: 'event_venue.city' }
                    - { property: 'streetName', label: 'event_venue.street_name' }

            list:
                collapse_actions: true

                actions:
                    - { name: 'edit', icon: 'pen' }
                    - { name: 'delete', icon: 'minus-circle' }

            edit:
                title: 'entity.label.event_venue'
