{
    type: 'panel',
    label: 'FTP',
    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: 'FTP',
            xs: 12,
            sm: 12,
            md: 12,
            lg: 12,
            xl: 12,
        },
        ftpHost: {
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'text',
            label: 'host',
            help: 'IP address or hostname',
            newLine: true,
            validator: 'data.ftpHost',
            validatorNoSaveOnError: true,
        },
        ftpPort: {
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            min: 1,
            max: 65535,
            type: 'number',
            label: 'Port',
            validator: 'data.ftpPort',
            validatorNoSaveOnError: true,
        },
        ftpUser: {
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'text',
            label: 'Username',
            newLine: true,
            validator: 'data.ftpUser',
            validatorNoSaveOnError: true,
        },
        ftpPassword: {
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'password',
            visible: true,
            label: 'Password',
            validator: 'data.ftpPassword',
            validatorNoSaveOnError: true,
        },
        ftpDeleteOldBackup: {
            type: 'checkbox',
            label: 'Delete old FTP-Backups',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            newLine: true,
        },
        ftpSecure: {
            type: 'checkbox',
            label: 'Secure FTP connection (explicit TLS)',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
        },
        ftpDeleteAfter: {
            newLine: true,
            hidden: '!data.ftpDeleteOldBackup || !data.advancedDelete',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            min: 1,
            max: 1000,
            type: 'number',
            label: 'piece',
            help: 'Delete old ioBroker backups with the exception of the last X pieces',
        },
        ftpOwnDir: {
            type: 'checkbox',
            label: 'Extra path for backup types',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            newLine: true,
        },
        ftpSignedCertificates: {
            hidden: '!data.ftpSecure',
            type: 'checkbox',
            label: 'Allow only signed certificates',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
        },
        ftpMinimalDir: {
            hidden: '!data.ftpOwnDir',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'text',
            label: 'Path for ioBroker backup',
            newLine: true,
        },
        ftpCcuDir: {
            hidden: '!data.ftpOwnDir',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'text',
            label: 'Path for CCU backup',
        },
        ftpDir: {
            hidden: 'data.ftpOwnDir',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'text',
            label: 'Path',
            newLine: true,
        },
    },
}
