use strict;
use warnings;

our @CustomFields = (
    {
        Name        => 'Domain',
        Type        => 'FreeformMultiple',
        Queue       => [ 'Incidents', 'Incident Reports', 'Investigations', 'Countermeasures' ],
        Disabled    => 0,
        Description => 'Domain for RTIR queues',
        LinkValueTo =>
            '__WebPath__/RTIR/Tools/Lookup.html?type=host&q=__CustomField__&ticket=__id__'
    },
);

our @ScripActions = (
    {
        Name        => 'RTIR parse message for Domains',
        Description => 'Set Domain custom field from message content',
        ExecModule  => 'RTIR_FindDomain',
    },
    {   Name        => 'RTIR merge Domains',                                 # loc
        Description => 'Merge multiple Domains on ticket merge',             # loc
        ExecModule  => 'RTIR_MergeDomains',
    },
);

our @Scrips = (
    {
        Description    => "SetDomainFromContent",
        Queue          => [ 'Incidents', 'Incident Reports', 'Investigations', 'Countermeasures' ],
        ScripCondition => 'On Correspond',
        ScripAction    => 'RTIR parse message for Domains',
        Template       => 'Blank'
    },
    {
        Description    => "SetDomainFromContent",
        Queue          => [ 'Incidents', 'Incident Reports', 'Investigations', 'Countermeasures' ],
        ScripCondition => 'On Create',
        ScripAction    => 'RTIR parse message for Domains',
        Template       => 'Blank'
    },
    {   Description => "MergeDomains",
        Queue =>
            [ 'Incidents', 'Incident Reports', 'Investigations', 'Countermeasures' ],
        ScripCondition => 'RTIR Merge',
        ScripAction    => 'RTIR merge Domains',
        Template       => 'Blank'
    },
    {   Description    => "On Linking To Incident Copy Domains",
        Queue          => 'Incident Reports',
        ScripCondition => 'RTIR Linking To Incident',
        ScripAction    => 'RTIR merge Domains',
        Template       => 'Blank'
    },
);
