{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "properties": {
        "calendar_provider": {
            "type": "string",
            "input_type": "radio",
            "hidden": false,
            "title": "Calendar provider",
            "tab": "",
            "misc": {
                "options": [
                    {
                        "value": "google",
                        "title": "Google Calendar",
                        "icon": "icon-google.svg",
                        "required_plan": "start"
                    },
                    {
                        "value": "outlook",
                        "title": "Microsoft/Outlook",
                        "icon": "icon-microsoft.svg",
                        "required_plan": "premium"
                    }
                ],
                "radio_type": "icon"
            },
            "required": true,
            "dependency": [],
            "default_value": "google",
            "editable": true
        },
        "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_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)",
                "hidden": true
            },
            "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_in_provider_id": {
            "type": "string",
            "input_type": "select",
            "hidden": false,
            "title": "Calendar in Provider 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": "radio",
            "hidden": false,
            "title": "Mode",
            "tab": "general",
            "misc": {
                "tooltip": "Choose the calendar connection mode",
                "options": {
                    "Two-ways": {
                        "title": "Two-ways",
                        "description": "Sync events in both directions - import external events and export bookings"
                    },
                    "One-way-import": {
                        "title": "One-way (import)",
                        "description": "Only import events from external calendar to block availability"
                    },
                    "One-way": {
                        "title": "One-way (export)",
                        "description": "Only export bookings to external calendar"
                    }
                },
                "default_value": "Two-ways",
                "description": "<strong>One-way (import):</strong> This mode will import all unavailable times from your Connected 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 Connected Calendar, but will not check availability of your Connected Calendar (risk of double-booking).<br><br>\n                    <strong>Two-ways (recommended):</strong> This mode will both import unavailable times from Connected Calendar to Webba Calendar and add Webba bookings to your Connected Calendar.<br><br>",
                "radio_type": "dots"
            },
            "required": true,
            "dependency": [],
            "default_value": "Two-ways",
            "editable": true
        },
        "calendar_access_token": {
            "type": "string",
            "input_type": "webba_google_access_token",
            "hidden": false,
            "title": "Authorization",
            "tab": null,
            "misc": {
                "hidden": true
            },
            "required": false,
            "dependency": [],
            "default_value": "general",
            "editable": true
        }
    }
}