# ===================================
#  Field Definitions
# ===================================

fields:

    search:
        type: Rainlab\Pages\FormWidgets\MenuItemSearch

    title:
        span: left
        label: rainlab.pages::lang.menuitem.title

    type:
        span: right
        label: rainlab.pages::lang.menuitem.type
        type: dropdown

    url:
        label: rainlab.pages::lang.menuitem.url

    reference:
        label: rainlab.pages::lang.menuitem.reference
        type: dropdown
        cssClass: input-sidebar-control

    cmsPage:
        label: rainlab.pages::lang.menuitem.cms_page
        comment: rainlab.pages::lang.menuitem.cms_page_comment
        type: dropdown
        cssClass: input-sidebar-control

    nesting:
        label: rainlab.pages::lang.menuitem.allow_nested_items
        comment: rainlab.pages::lang.menuitem.allow_nested_items_comment
        type: checkbox
        default: true

    replace:
        label: rainlab.pages::lang.menuitem.replace
        comment: rainlab.pages::lang.menuitem.replace_comment
        type: checkbox
        default: true

tabs:
    fields:
        viewBag[isHidden]:
            label: rainlab.pages::lang.menuitem.hidden
            comment: rainlab.pages::lang.menuitem.hidden_comment
            type: checkbox
            tab: rainlab.pages::lang.menuitem.display_tab

        code:
            label: rainlab.pages::lang.menuitem.code
            comment: rainlab.pages::lang.menuitem.code_comment
            tab: rainlab.pages::lang.menuitem.attributes_tab
            span: auto

        viewBag[cssClass]:
            label: rainlab.pages::lang.menuitem.css_class
            comment: rainlab.pages::lang.menuitem.css_class_comment
            tab: rainlab.pages::lang.menuitem.attributes_tab
            span: auto

        viewBag[isExternal]:
            label: rainlab.pages::lang.menuitem.external_link
            comment: rainlab.pages::lang.menuitem.external_link_comment
            type: checkbox
            tab: rainlab.pages::lang.menuitem.attributes_tab
