fields:
    name:
        label: 'offline.mall::lang.discounts.name'
        oc.commentPosition: ''
        span: auto
        type: text
    valid_from:
        label: 'offline.mall::lang.discounts.valid_from'
        mode: date
        span: auto
        type: datepicker
    expires:
        label: 'offline.mall::lang.discounts.expires'
        oc.commentPosition: ''
        mode: date
        span: auto
        type: datepicker
    section_type:
        label: 'offline.mall::lang.discounts.section_type'
        span: left
        type: section
    section_trigger:
        label: 'offline.mall::lang.discounts.section_trigger'
        span: auto
        type: section
    type:
        label: 'offline.mall::lang.discounts.type'
        oc.commentPosition: ''
        span: left
        type: dropdown
    trigger:
        label: 'offline.mall::lang.discounts.trigger'
        oc.commentPosition: ''
        span: auto
        type: dropdown
    _amounts:
        label: 'offline.mall::lang.discounts.amount'
        oc.commentPosition: ''
        span: left
        trigger:
            action: show
            field: type
            condition: value[fixed_amount]
        type: mall.price
    _totals_to_reach:
        label: 'offline.mall::lang.discounts.total_to_reach'
        oc.commentPosition: ''
        span: auto
        trigger:
            action: show
            field: trigger
            condition: value[total]
        type: mall.price
    shipping_methods:
        span: right
        type: relation
        trigger:
            action: show
            field: trigger
            condition: value[shipping_method]

    rate:
        label: 'offline.mall::lang.discounts.rate'
        oc.commentPosition: ''
        span: left
        trigger:
            action: show
            field: type
            condition: value[rate]
        type: number
    max_number_of_usages:
        label: 'offline.mall::lang.discounts.max_number_of_usages'
        oc.commentPosition: ''
        span: left
        type: text
    code:
        label: 'offline.mall::lang.discounts.code'
        comment: 'offline.mall::lang.discounts.code_comment'
        oc.commentPosition: ''
        span: auto
        trigger:
            action: show
            field: trigger
            condition: value[code]
        type: text
    shipping_description:
        label: 'offline.mall::lang.discounts.shipping_description'
        oc.commentPosition: ''
        span: left
        trigger:
            action: show
            field: type
            condition: value[shipping]
        type: text
    product:
        label: 'offline.mall::lang.common.product'
        oc.commentPosition: ''
        descriptionFrom: user_defined_id
        span: auto
        type: recordfinder
        list: ~/plugins/offline/mall/models/product/columns.yaml
        nameFrom: name
        trigger:
            action: show
            field: trigger
            condition: value[product]
    customer_group:
        label: 'offline.mall::lang.common.customer_group'
        span: right
        type: recordfinder
        list: ~/plugins/offline/mall/models/customergroup/columns.yaml
        nameFrom: name
        trigger:
            action: show
            field: trigger
            condition: value[customer_group]
    payment_method:
        label: 'offline.mall::lang.discounts.payment_method_description'
        span: right
        type: recordfinder
        list: ~/plugins/offline/mall/models/discount/columns.yaml
        nameFrom: name
        trigger:
            action: show
            field: trigger
            condition: value[payment_method]
    shipping_guaranteed_days_to_delivery:
        label: 'offline.mall::lang.discounts.shipping_guaranteed_days_to_delivery'
        oc.commentPosition: ''
        span: left
        trigger:
            action: show
            field: type
            condition: value[shipping]
        type: number
    _shipping_prices:
        label: 'offline.mall::lang.discounts.shipping_price'
        oc.commentPosition: ''
        span: left
        trigger:
            action: show
            field: type
            condition: value[shipping]
        type: mall.price
