auto_admin:
    admin:
        entities:
            App\Entity\Page:
                name: 'Page'
                slug: 'page'
                list:
                    fields:
                        - { property: 'id', label: "#" }
                        - { property: '_tr.name', label: "Titre" }
                        - { property: '_tr.slug', label: "Identifiant d'url" }
                        - { property: 'homepage', label: "Page d'accueil" }
                    item_actions:
                        - update
                        - duplicate
                        - delete
                form:
                    create:
                        - { property: '_tr.name', label: "Titre" }
                    update:
                        - { property: 'publishable', label: "Actif", type: 'boolean', required: false, priority: 1 }
                        - { property: '_tr.name', label: "Titre" }
                        - { property: '_tr.slug', label: "Identifiant d'url", required: false }
                        - { property: 'slugAdmin', label: "Identifiant d'url admin", required: false, roles: [ 'ROLE_SUPER_ADMIN' ] }
                        - { property: 'homepage', label: "Page d'accueil", type: 'boolean' }

            AutoAdmin\Bundle\Content\Entity\Site:
                name: 'Site'
                slug: 'site'
                roles: [ 'ROLE_SUPER_ADMIN' ]
                actions:
                    - { name: 'Liste', action: 'list' }
                    - { name: 'Ajouter un site', action: 'create', buttonColor: 'success', icon: 'fa-solid fa-plus' }
                    - { name: 'Modifier', action: 'update' }
                    - { name: 'Dupliquer', action: 'duplicate' }
                    - { name: 'Supprimer', action: 'delete' }
                list:
                    fields:
                        - { property: 'id', label: "#" }
                        - { property: 'title', label: "Title" }
                        - { property: 'slug', label: "Slug" }
                        - { property: 'domains', label: "Domaines" }
                    item_actions:
                        - update
                        - duplicate
                        - delete
                form:
                    create:
                        - { property: 'title', label: "Titre" }
                        - { property: 'slug', label: "Slug" }
                        - { property: 'domains', label: "Domaines" }
                    update:
                        - { property: 'title', label: "Title" }
                        - { property: 'slug', label: "Slug" }
                        - { property: 'domains', label: "Domaines" }

            AutoAdmin\Bundle\Content\Entity\Domain:
                name: 'Domaine'
                slug: 'domain'
                roles: [ 'ROLE_SUPER_ADMIN' ]
                actions:
                    - { name: 'Liste', action: 'list' }
                    - { name: 'Ajouter un domaine', action: 'create', buttonColor: 'success', icon: 'fa-solid fa-plus' }
                    - { name: 'Modifier', action: 'update' }
                    - { name: 'Dupliquer', action: 'duplicate' }
                    - { name: 'Supprimer', action: 'delete' }
                list:
                    fields:
                        - { property: 'id', label: "#" }
                        - { property: 'domain', label: "Domaine" }
                        - { property: 'locales', label: "Langues" }
                    item_actions:
                        - update
                        - duplicate
                        - delete
                form:
                    create:
                        - { property: 'domain', label: "Domaine" }
                        - { property: 'locales', label: "Langues" }
                    update:
                        - { property: 'domain', label: "Domaine" }
                        - { property: 'locales', label: "Langues" }

            AutoAdmin\Bundle\Content\Entity\Locale:
                name: 'Langue'
                slug: 'locale'
                roles: [ 'ROLE_SUPER_ADMIN' ]
                actions:
                    - { name: 'Liste', action: 'list' }
                    - { name: 'Ajouter une langue', action: 'create', buttonColor: 'success', icon: 'fa-solid fa-plus' }
                    - { name: 'Modifier', action: 'update' }
                    - { name: 'Dupliquer', action: 'duplicate' }
                    - { name: 'Supprimer', action: 'delete' }
                list:
                    fields:
                        - { property: 'id', label: "#" }
                        - { property: 'code', label: "Code" }
                    item_actions:
                        - update
                        - duplicate
                        - delete
                form:
                    create:
                        - { property: 'code', label: "Code" }
                    update:
                        - { property: 'code', label: "Code" }

            AutoAdmin\Bundle\Seo\Entity\Redirect:
                name: 'Redirections'
                slug: 'redirection'
                roles: [ 'ROLE_SUPER_ADMIN' ]
                controller: 'AutoAdmin\Bundle\Admin\Controller\Admin\RedirectController'
                actions:
                    - { name: 'Liste', action: 'list' }
                    - { name: 'Création', action: 'create' }
                    - { name: 'Édition', action: 'update' }
                    - { name: 'Importer', action: 'import', icon: 'fa fa-upload' }
                    - { name: 'Exporter', action: 'export', icon: 'fa fa-download' }
                    - { name: "Fichier d'exemple", action: 'templateFile' }
                    - { name: 'Supprimer', action: 'delete' }
                    - { name: 'Dupliquer', action: 'duplicate' }
                list:
                    fields:
                        - { property: 'id', label: '#' }
                        - { property: 'origin', label: 'Origine' }
                        - { property: 'destination', label: 'Destination' }
                        - { property: 'type', label: 'Type' }
                        - { property: 'counter', label: 'Nombre de redirections' }
                        - { property: 'createdAt', label: 'Création' }
                        - { property: 'updatedAt', label: 'Modification' }
                        - { property: 'rootRedirect', label: 'Globale' }
                        - { property: 'lastHit', label: 'Dernière utilisation' }
                    topbar:
                        - create
                        - import
                        - export
                    item_actions:
                        - update
                        - duplicate
                        - delete
                    group_actions:
                        - delete
                form:
                    create:
                        - { property: 'origin', label: 'Origine' }
                        - { property: 'destination', label: 'Destination' }
                        - { property: 'type', label: 'Type', type: 'AutoAdmin\Bundle\Seo\Form\RedirectCodeType' }
                        - { property: 'rootRedirect', label: 'Globale' }
                    update:
                        - { property: 'origin', label: 'Origine' }
                        - { property: 'destination', label: 'Destination' }
                        - { property: 'type', label: 'Type', type: 'AutoAdmin\Bundle\Seo\Form\RedirectCodeType' }
                        - { property: 'rootRedirect', label: 'Globale' }
                export:
                    fields:
                        - { property: 'id', label: 'Identifiant' }
                        - { property: 'origin', label: 'Origine' }
                        - { property: 'destination', label: 'Destination' }
                        - { property: 'type', label: 'Type' }
                        - { property: 'counter', label: 'Nombre de redirections' }
                        - { property: 'createdAt', label: 'Création' }
                        - { property: 'updatedAt', label: 'Modification' }
                        - { property: 'rootRedirect', label: 'Globale' }
                        - { property: 'lastHit', label: 'Dernière utilisation' }

            AutoAdmin\Bundle\Menu\Entity\Menu:
                name: 'Menu'
                slug: 'menu'
                icon: 'fa fa-gear'
                controller: 'AutoAdmin\Bundle\Menu\Controller\Admin\MenuController'
                actions:
                    - { name: 'Liste', action: 'list', buttonColor: 'secondary', }
                    - { name: 'Nouveau', action: 'create', buttonColor: 'secondary', }
                    -   name: 'Modifier'
                        action: 'item_index'
                        type: 'entity_action'
                        target_entity: 'AutoAdmin\Bundle\Menu\Entity\MenuItem'
                        target_action: 'list'
                        buttonColor: 'success'
                        icon: 'far fa-pen'
                        routeParamMap:
                            menuId: 'property_path:id'
                    - { name: 'Supprimer', action: 'delete', buttonColor: 'danger', }
                    - { name: 'Dupliquer', action: 'duplicate' }
                form:
                    create:
                        - { property: 'name' }
                        - { property: 'slug' }
                list:
                    fields:
                        - { property: 'id', label: '#' }
                        - { property: 'createdAt', label: 'Création' }
                        - { property: 'updatedAt', label: 'Modification' }
                        - { property: 'name', label: 'Nom' }
                        - { property: 'slug', label: 'Slug' }
                    item_actions:
                        - 'item_index'
                        - 'duplicate'
                        - 'delete'

            AutoAdmin\Bundle\Menu\Entity\MenuItem:
                name: 'Menu Item'
                slug: 'menu-item'
                icon: 'fa fa-gear'
                controller: 'AutoAdmin\Bundle\Menu\Controller\Admin\MenuItemController'
                actions:
                    - { name: 'Liste', action: 'list', }
                    - { name: 'Nouveau', action: 'create', }
                    - { name: 'Modifier', action: 'update', }
                    - { name: 'Supprimer', action: 'delete', }
                    - { name: 'Ordonner', action: 'reorder', }


            AutoAdmin\Bundle\Content\Entity\StaticText:
                name: 'Traductions'
                slug: 'i18n'
                icon: 'fa fa-globe'
                # should be handled through migrations, no add/delete
                actions:
                    - { name: 'Liste', action: 'list', }
                    - { name: 'Modifier', action: 'update', }
                form:
                    create:
                        - { property: 'domain', label: 'Domaine de traduction' }
                        - { property: 'key', label: 'Clef' }
                        - { property: '_tr.value', label: 'Valeur' }
                    update:
                        - { property: 'domain', label: 'Domaine de traduction' }
                        - { property: 'key', label: 'Clef' }
                        - { property: '_tr.value', label: 'Valeur' }
                list:
                    fields:
                        - { property: 'domain', label: "Domaine" }
                        - { property: 'key', label: "Clé" }
                        - { property: '_tr.value', label: "Valeur" }
                        - { property: 'createdAt', label: "Création" }
                        - { property: 'updatedAt', label: 'Modification' }


            AutoAdmin\Bundle\Content\Entity\Log:
                name: 'Logs'
                slug: 'log'
                roles: [ 'ROLE_SUPER_ADMIN' ]
                icon: 'fa fa-file'
                controller: 'AutoAdmin\Bundle\Admin\Controller\Admin\LogController'
                actions:
                    - { name: 'Liste', action: 'list', }
                    - { name: 'Voir', action: 'view', icon: 'fa fa-circle-info' }
                    - { name: 'Admin', action: 'adminLink', icon: 'fa fa-pen' }
                    - { name: 'Front', action: 'frontLink', icon: 'fa fa-eye' }
                list:
                    item_actions:
                        - view
                        - adminLink
                        - frontLink
                    fields:
                        - { property: 'id', label: "#" }
                        - { property: 'administrator', label: "Administrateur" }
                        - { property: 'createdAt', label: "Création" }
                        - { property: 'type', label: "Type" }
                        - { property: 'entity', label: "Entité" }
                        - { property: 'title', label: "Titre" }
                        - { property: 'frontLink', label: "Slug" }
                view:
                    fields:
                        - { property: 'id', label: "#" }
                        - { property: 'administrator', label: "Administrateur" }
                        - { property: 'createdAt', label: "Création" }
                        - { property: 'type', label: "Type" }
                        - { property: 'entity', label: "Entité" }
                        - { property: 'title', label: "Titre" }
                        - { property: 'frontLink', label: "Slug" }

            AutoAdmin\Bundle\Cache\Entity\CacheRule:
                name: 'Règles de cache'
                slug: 'cache-rule'
                roles: [ 'ROLE_SUPER_ADMIN' ]
                icon: 'fa fa-file'
                controller: AutoAdmin\Bundle\Admin\Controller\Admin\CacheRuleController
                actions:
                    - { name: 'Liste', action: 'list' }
                    - { name: 'Ajouter une règle de cache', action: 'create', buttonColor: 'success', icon: 'fa-solid fa-plus' }
                    - { name: 'Modifier', action: 'update' }
                    - { name: 'Dupliquer', action: 'duplicate' }
                    - { name: 'Supprimer', action: 'delete' }
                list:
                    fields:
                        - { property: 'id', label: "#" }
                        - { property: 'pattern', label: "Pattern" }
                        - { property: 'isExcluded', label: "Exclure" }
                        - { property: 'exactMatch', label: "Exact match" }
                    item_actions:
                        - update
                        - duplicate
                        - delete
                form:
                    create:
                        - { property: 'pattern', label: "Pattern" }
                        - { property: 'isExcluded', label: "Exclure" }
                        - { property: 'exactMatch', label: "Exact match" }
                    update:
                        - { property: 'pattern', label: "Pattern" }
                        - { property: 'isExcluded', label: "Exclure" }
                        - { property: 'exactMatch', label: "Exact match" }
