{
    type: 'panel',
    label: 'PostgreSQL Backup',
    items: {
        _checkConfig: {
            // this component is not visible in the UI
            // it checks the configuration
            type: 'custom',
            bundlerType: 'module',
            i18n: true,
            url: 'custom/customComponents.js',
            name: 'ConfigCustomBackItUpSet/Components/CheckAllConfigInvisible',
        },
        _header: {
            type: 'header',
            size: 2,
            text: 'PostgreSQL Backup',
            xs: 12,
            sm: 12,
            md: 12,
            lg: 12,
            xl: 12,
        },
        detectNow: {
            type: 'custom',
            bundlerType: 'module',
            hidden: 'data.pgSqlMulti',
            url: 'custom/customComponents.js',
            name: 'ConfigCustomBackItUpSet/Components/DetectConfig',
            label: 'Detect config',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 6,
            xl: 6,
            custom: {
                adapter: 'pgSql',
            },
        },
        _helpLine1: {
            hidden: 'data.pgSqlMulti',
            newLine: true,
            type: 'divider',
            color: 'primary',
        },
        pgSqlHost: {
            hidden: 'data.pgSqlMulti',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'text',
            label: 'PostgreSQL Hostname',
            newLine: true,
            validator: 'data.pgSqlHost',
            validatorNoSaveOnError: true,
        },
        pgSqlPort: {
            hidden: 'data.pgSqlMulti',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            min: 1,
            max: 65535,
            type: 'number',
            label: 'PostgreSQL port',
            validator: 'data.pgSqlPort',
            validatorNoSaveOnError: true,
        },
        pgSqlName: {
            hidden: 'data.pgSqlMulti',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'text',
            label: 'PostgreSQL database name',
            validator: 'data.pgSqlName',
            validatorNoSaveOnError: true,
        },
        pgSqlUser: {
            hidden: 'data.pgSqlMulti',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'text',
            label: 'PostgreSQL username',
            newLine: true,
            validator: 'data.pgSqlUser',
            validatorNoSaveOnError: true,
        },
        pgSqlPassword: {
            hidden: 'data.pgSqlMulti',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'password',
            visible: true,
            label: 'PostgreSQL password',
            validator: 'data.pgSqlPassword',
            validatorNoSaveOnError: true,
        },
        pgSqlDumpExe: {
            hidden: 'data.pgSqlMulti',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'text',
            label: 'Full path',
            help: 'Path with filename to postgresql executable (leave empty to use default)',
        },
        pgSqlMulti: {
            type: 'checkbox',
            label: 'Backup of several systems',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            newLine: true,
        },
        _helpLine2: {
            hidden: '!data.pgSqlMulti',
            newLine: true,
            type: 'divider',
            color: 'primary',
        },
        pgSqlEvents: {
            newLine: true,
            type: 'table',
            xs: 12,
            sm: 12,
            md: 12,
            lg: 12,
            xl: 12,
            label: 'PostgreSQL hosts',
            hidden: '!data.pgSqlMulti',
            encryptedAttributes: ['pass'],
            labelsInHeader: true,
            items: [
                {
                    attr: 'host',
                    type: 'text',
                    title: 'host',
                    width: '15%',
                },
                {
                    attr: 'port',
                    type: 'number',
                    title: 'Port',
                    width: '7%',
                },
                {
                    attr: 'user',
                    type: 'text',
                    title: 'Username',
                    width: '15%',
                },
                {
                    attr: 'pass',
                    type: 'password',
                    title: 'Password',
                    width: '15%',
                },
                {
                    attr: 'dbName',
                    type: 'text',
                    title: 'Database name',
                    width: '15%',
                },
                {
                    attr: 'nameSuffix',
                    type: 'text',
                    title: 'Name suffix',
                    width: '15%',
                },
                {
                    attr: 'exe',
                    type: 'text',
                    title: 'Full path',
                    width: '18%',
                },
            ],
        },
    },
}
