% foreach( @lines ) {
<& /Search/Elements/ConditionRow, Condition => $_ &>
% }
<%INIT>

my @lines = (
    {
        Name => 'id',
        Field => loc('id'),
        Op => {
            Type => 'component',
            Path => '/Elements/SelectEqualityOperator',
        },
        Value => { Type => 'text', Size => 5 }
    },
    {
        Name => 'Attachment',
        Field => {
            Type => 'component',
            Path => '/Asset/Elements/SelectAttachmentField',
        },
        Op => {
            Type => 'component',
            Path => '/Elements/SelectBoolean',
            Arguments => {
                True => loc("matches"),
                False => loc("doesn't match"),
                TrueVal => 'LIKE',
                FalseVal => 'NOT LIKE',
            },
        },
        Value => { Type => 'text', Size => 20 },
    },
    {
        Name => 'Catalog',
        Field => loc('Catalog'),
        Op => {
            Type => 'component',
            Path => '/Elements/SelectBoolean',
            Arguments => { TrueVal=> '=', FalseVal => '!=' },
        },
        Value => {
            Type => 'component',
            Path => '/Asset/Elements/SelectCatalog',
            Arguments => { NamedValues => 1, ShowNullOption => 1, UpdateSession => 0, CheckRight => 'ShowAsset' },
        },
    },
    {
        Name => 'Status',
        Field => loc('Status'),
        Op => {
            Type => 'component',
            Path => '/Elements/SelectBoolean',
            Arguments => { TrueVal=> '=', FalseVal => '!=' },
        },
        Value => {
            Type => 'component',
            Path => '/Asset/Elements/SelectStatus',
            Arguments => { Catalogs => \%catalogs },
        },
    },
    {
        Name => 'Watcher',
        Field => {
            Type => 'component',
            Path => '/Asset/Search/Elements/SelectPersonType',
            Arguments => { Default => 'Owner' },
        },
        Op => {
            Type => 'component',
            Path => '/Elements/SelectMatch',
        },
        Value => { Type => 'text', Size => 20 }
    },
    {
        Name => 'WatcherGroup',
        Field => {
            Type => 'component',
            Path => '/Asset/Search/Elements/SelectPersonType',
            Arguments => { Default => 'Owner', Suffix => 'Group' },
        },
        Op => {
            Type => 'select',
            Options => [ '=' => loc('is') ],
        },
        Value => { Type => 'text', Size => 20, "data-autocomplete" => "Groups" }
    },
    {
        Name => 'Date',
        Field => {
            Type => 'component',
            Path => '/Asset/Elements/SelectDateType',
        },
        Op => {
            Type => 'component',
            Path => '/Elements/SelectDateRelation',
        },
        Value => {
            Type => 'component',
            Path => '/Elements/SelectDate',
            Arguments => { ShowTime => 0, Default => '' },
        },
    },
    {
        Name => 'Links',
        Field => {
            Type => 'component',
            Path => '/Asset/Search/Elements/SelectLinks',
        },
        Op => {
            Type => 'component',
            Path => '/Elements/SelectBoolean',
            Arguments => { TrueVal=> '=', FalseVal => '!=' },
        },
        Value => { Type => 'text', Size => 5 }
    },
);

$m->callback( Conditions => \@lines );

</%INIT>
<%ARGS>
%catalogs => ()
</%ARGS>