sylius_grid:
    grids:
        sylius_admin_product_attribute:
            driver:
                name: doctrine/orm
                options:
                    class: "%sylius.model.product_attribute.class%"
                    repository:
                        method: createListQueryBuilder
                        arguments: ["expr:service('sylius.context.locale').getLocaleCode()"]

            sorting:
                position: asc
            fields:
                name:
                    type: twig
                    label: sylius.ui.name
                    options:
                        template: "@SyliusAdmin/shared/grid/field/name.html.twig"
                        vars:
                            th_class: "w-75"
                code:
                    type: twig
                    label: sylius.ui.code
                    sortable: ~
                    options:
                        template: "@SyliusAdmin/shared/grid/field/code.html.twig"
                        vars:
                            th_class: "w-25"
                type:
                    type: twig
                    label: sylius.ui.type
                    sortable: ~
                    options:
                        template: "@SyliusUi/grid/field/label.html.twig"
                translatable:
                    type: twig
                    label: sylius.ui.translatable
                    sortable: ~
                    options:
                        template: "@SyliusAdmin/shared/grid/field/boolean.html.twig"
                position:
                    type: twig
                    label: sylius.ui.position
                    sortable: ~
                    options:
                        template: "@SyliusUi/grid/field/position.html.twig"
                        vars:
                            th_class: "w-1 text-center"
                            td_class: "text-center"
            filters:
                search:
                    type: string
                    label: sylius.ui.search
                    form_options:
                        type: !php/const Sylius\Component\Grid\Filter\StringFilter::TYPE_CONTAINS
                    options:
                        fields: [translations.name, code]
                type:
                    type: select
                    label: sylius.ui.type
                    form_options:
                        multiple: true
                        autocomplete: true
                        choices:
                            sylius.ui.checkbox: !php/const Sylius\Component\Attribute\AttributeType\CheckboxAttributeType::TYPE
                            sylius.ui.date: !php/const Sylius\Component\Attribute\AttributeType\DateAttributeType::TYPE
                            sylius.ui.datetime: !php/const Sylius\Component\Attribute\AttributeType\DatetimeAttributeType::TYPE
                            sylius.ui.float: !php/const Sylius\Component\Attribute\AttributeType\FloatAttributeType::TYPE
                            sylius.ui.integer: !php/const Sylius\Component\Attribute\AttributeType\IntegerAttributeType::TYPE
                            sylius.ui.percent: !php/const Sylius\Component\Attribute\AttributeType\PercentAttributeType::TYPE
                            sylius.ui.select: !php/const Sylius\Component\Attribute\AttributeType\SelectAttributeType::TYPE
                            sylius.ui.text: !php/const Sylius\Component\Attribute\AttributeType\TextAttributeType::TYPE
                            sylius.ui.textarea: !php/const Sylius\Component\Attribute\AttributeType\TextareaAttributeType::TYPE
                translatable:
                    type: boolean
                    label: sylius.ui.translatable
            actions:
                main:
                    create:
                        type: create_product_attribute
                item:
                    update:
                        type: update
                    delete:
                        type: delete
                bulk:
                    delete:
                        type: delete
