{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "properties": {
        "calendar_name": {
            "type": "string",
            "input_type": "text",
            "hidden": false,
            "title": "Calendar name (internal use only)",
            "tab": "general",
            "misc": {
                "tooltip": "Enter a name to identify the calendar."
            },
            "required": true,
            "dependency": [],
            "default_value": "",
            "editable": true
        },
        "calendar_provider": {
            "type": "string",
            "input_type": "radio",
            "hidden": false,
            "title": "Calendar provider",
            "tab": "",
            "misc": {
                "options": {
                    "google": "Google Calendar",
                    "outlook": "Outlook"
                }
            },
            "required": true,
            "dependency": [],
            "default_value": "google",
            "editable": true
        },
        "calendar_easy_auth": {
            "type": "string",
            "input_type": "checkbox",
            "hidden": true,
            "title": "Automatic authorization (recommended)",
            "tab": "advanced",
            "misc": {
                "yes": "Enabled",
                "tooltip": "Enable easy authorization for this calendar (recommended)"
            },
            "required": false,
            "dependency": [],
            "default_value": "yes",
            "editable": true
        },
        "calendar_user_id": {
            "type": "string",
            "input_type": "select",
            "hidden": true,
            "title": "User",
            "tab": "advanced",
            "misc": {
                "tooltip": "",
                "options": "backend"
            },
            "required": false,
            "dependency": [],
            "default_value": 0,
            "editable": true
        },
        "calendar_ggid": {
            "type": "string",
            "input_type": "select",
            "hidden": false,
            "title": "Calendar in Google Account",
            "tab": "general",
            "misc": {
                "tooltip": "Select calendar from the auhtorized account.",
                "enable": {
                    "endpoint": "get-calendar-auth-data",
                    "data": {
                        "calendar_id": "id"
                    },
                    "conditions": [
                        {
                            "operator": "=",
                            "value": true,
                            "field": "isAuthenticated"
                        }
                    ]
                },
                "hide": [
                    [
                        "id",
                        ">",
                        "0"
                    ]
                ],
                "options": "backend"
            },
            "required": false,
            "dependency": [],
            "default_value": "",
            "editable": true
        },
        "calendar_mode": {
            "type": "string",
            "input_type": "select",
            "hidden": false,
            "title": "Mode",
            "tab": "general",
            "misc": {
                "tooltip": "Choose the calendar connection mode",
                "options": {
                    "One-way": "One-way (export)",
                    "One-way-import": "One-way (import)",
                    "Two-ways": "Two-ways"
                },
                "default_value": "One-way",
                "description": "<strong>One-way (import):</strong> This mode will import all unavailable times from your Google Calendar to Webba Calendar. No meeting data is imported, only the time slots.<br><br>\n                    <strong>One-way (export):</strong> This mode will automatically add Webba bookings to your Google Calendar, but will not check availability of your Google calendar (risk of double-booking).<br><br>\n                    <strong>Two-ways (recommended):</strong> This mode will both import unavailable times from Google Calendar to Webba Calendar and add Webba bookings to your Google Calendar.<br><br>"
            },
            "required": true,
            "dependency": [],
            "default_value": null,
            "editable": true
        },
        "calendar_access_token": {
            "type": "string",
            "input_type": "webba_google_access_token",
            "hidden": false,
            "title": "Authorization",
            "tab": null,
            "misc": [],
            "required": false,
            "dependency": [],
            "default_value": "general",
            "editable": false
        }
    }
}