{
    type: 'panel',
    label: 'Dropbox',
    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: 'Dropbox',
            xs: 12,
            sm: 12,
            md: 12,
            lg: 12,
            xl: 12,
        },
        dropboxTokenType: {
            type: 'select',
            label: 'Dropbox-API Type',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            options: [
                {
                    label: 'Default Dropbox-API App for BackItUp',
                    value: 'default',
                },
                {
                    label: 'Custom app with long-lived tokens',
                    value: 'custom',
                },
            ],
            default: 'default',
            newLine: true,
        },
        _dropbox: {
            hidden: "data.dropboxTokenType === 'custom'",
            newLine: true,
            type: 'custom',
            bundlerType: 'module',
            i18n: true,
            url: 'custom/customComponents.js',
            name: 'ConfigCustomBackItUpSet/Components/Dropbox',
            xs: 12,
            sm: 12,
            md: 12,
            lg: 12,
            xl: 12,
        },
        dropboxAccessToken: {
            hidden: "data.dropboxTokenType === 'default'",
            xs: 12,
            sm: 12,
            md: 12,
            lg: 12,
            xl: 12,
            type: 'password',
            visible: true,
            label: 'Access token',
            help: 'dropbox.com',
            helpLink: 'https://www.dropbox.com/developers/apps',
            newLine: true,
        },
        dropboxDeleteOldBackup: {
            type: 'checkbox',
            label: 'Delete old Dropbox-Backups',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            newLine: true,
        },
        dropboxOwnDir: {
            type: 'checkbox',
            label: 'Extra path for backup types',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
        },
        dropboxDeleteAfter: {
            newLine: true,
            hidden: '!data.dropboxDeleteOldBackup || !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',
        },
        dropboxMinimalDir: {
            hidden: '!data.dropboxOwnDir',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'text',
            label: 'Dropbox Path for ioBroker backup',
            newLine: true,
        },
        dropboxCcuDir: {
            hidden: '!data.dropboxOwnDir',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'text',
            label: 'Dropbox Path for CCU backup',
        },
        dropboxDir: {
            hidden: 'data.dropboxOwnDir',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 4,
            xl: 4,
            type: 'text',
            label: 'Path',
            help: 'Dropbox path',
            newLine: true,
        },
    },
}
