{
    type: 'panel',
    label: 'WebDAV',
    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: 'WebDAV',
            xs: 12,
            sm: 12,
            md: 12,
            lg: 12,
            xl: 12,
        },
        webdavURL: {
            newLine: true,
            xs: 12,
            sm: 9,
            md: 6,
            lg: 3,
            xl: 3,
            type: 'text',
            label: 'WebDAV URL',
            validator: 'data.webdavURL',
            validatorNoSaveOnError: true,
        },
        webdavUsername: {
            newLine: true,
            xs: 12,
            sm: 9,
            md: 6,
            lg: 3,
            xl: 3,
            type: 'text',
            label: 'Username',
            validator: 'data.webdavUsername',
            validatorNoSaveOnError: true,
        },
        webdavPassword: {
            xs: 12,
            sm: 9,
            md: 6,
            lg: 3,
            xl: 3,
            type: 'password',
            visible: true,
            label: 'Password',
            validator: 'data.webdavPassword',
            validatorNoSaveOnError: true,
        },
        _testConnection: {
            newLine: true,
            variant: 'contained',
            color: 'primary',
            disabled: '!_alive',
            type: 'sendTo',
            error: {
                'connect timeout': 'Connection timeout',
            },
            icon: 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJjdXJyZW50Q29sb3IiIGQ9Im0xMiAyMWwzLjYtNC44Yy0xLS43NS0yLjI1LTEuMi0zLjYtMS4ycy0yLjYuNDUtMy42IDEuMnptMC0xOEM3Ljk1IDMgNC4yMSA0LjM0IDEuMiA2LjZMMyA5YzIuNS0xLjg4IDUuNjItMyA5LTNzNi41IDEuMTIgOSAzbDEuOC0yLjRDMTkuNzkgNC4zNCAxNi4wNSAzIDEyIDNtMCA2Yy0yLjcgMC01LjE5Ljg5LTcuMiAyLjRsMS44IDIuNEM4LjEgMTIuNjcgOS45NyAxMiAxMiAxMnMzLjkuNjcgNS40IDEuOGwxLjgtMi40QzE3LjE5IDkuODkgMTQuNyA5IDEyIDkiLz48L3N2Zz4=',
            command: 'testWebDAV',
            jsonData: '{"config": {"host": "${data.webdavURL}", "username": "${data.webdavUsername}", "password": "${data.webdavPassword}", "signedCertificates": "${data.webdavSignedCertificates}"}}',
            label: 'Test connection',
        },
        webdavSignedCertificates: {
            newLine: true,
            type: 'checkbox',
            label: 'Allow only signed certificates',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 3,
            xl: 3,
        },
        webdavDeleteOldBackup: {
            type: 'checkbox',
            label: 'Delete old WebDAV-Backups',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 3,
            xl: 3,
        },
        webdavDeleteAfter: {
            newLine: true,
            hidden: '!data.webdavDeleteOldBackup || !data.advancedDelete',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 3,
            xl: 3,
            min: 1,
            max: 1000,
            type: 'number',
            label: 'piece',
            help: 'Delete old ioBroker backups with the exception of the last X pieces',
        },
        webdavOwnDir: {
            newLine: true,
            type: 'checkbox',
            label: 'Extra path for backup types',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 3,
            xl: 3,
        },
        webdavMinimalDir: {
            hidden: '!data.webdavOwnDir',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 3,
            xl: 3,
            type: 'text',
            label: 'Path for ioBroker backup',
            newLine: true,
        },
        webdavCcuDir: {
            hidden: '!data.webdavOwnDir',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 3,
            xl: 3,
            type: 'text',
            label: 'Path for CCU backup',
        },
        webdavDir: {
            hidden: 'data.webdavOwnDir',
            xs: 12,
            sm: 9,
            md: 6,
            lg: 3,
            xl: 3,
            type: 'text',
            label: 'Path',
            newLine: true,
        },
    },
}
