syntax = "proto3";

package com.wixpress.appservice.api;

import "google/protobuf/wrappers.proto";
import "wix/api/validations.proto";
import "components_catalog_common.proto";
import "components_catalog_data/page_replace/page_replace.proto";
import "wix/api/annotations.proto";

// An iframe to be displayed as a full page on the user’s site
message PageComponentData {
    // Hide this page from the user’s site menu
    bool is_hidden = 1;
    // Show in pages menu
    google.protobuf.BoolValue show_in_panel = 2;
    // Set page to full width
    bool is_full_width = 3;
    // Keep default and let users stretch page to full width (GFPP)
    bool add_strech_button = 4;
    // A public link to the page endpoint
    google.protobuf.StringValue page_endpoint_url = 5 [(wix.api.format) = WEB_URL];
    // A public link to the mobile endpoint
    google.protobuf.StringValue page_mobile_endpoint_url = 6; // todo: WEB_URL
    // A public link to the settings endpoint
    google.protobuf.StringValue settings_endpoint_url = 7; //todo: WEB_URL only after migration from oldJson. maybe chage to StringValue
    // A public link to the SEO endpoint
    google.protobuf.StringValue seo_endpoint_url = 8; // todo: WEB_URL
    // When true, this is the default component
    // Main visual component. One components must be default (no more than 1 component)
    bool default = 9;
    // Second visual component
    // When this is turned on, this page will be added to the site when installing the app, regardless of whether it's the default component or not
    bool essential = 10;
    // Published state for this page
    bool published = 11;
    // This ID is used to identify your page endpoint in a Wix site. You can use this ID when using methods of the Wix SDK
    string tpa_widget_id = 12 [(wix.api.readOnly) = true];
    // Article id in settings panel
    google.protobuf.StringValue help_id = 13;
    // Default Mobile Height
    google.protobuf.Int32Value default_mobile_height = 14;
    // Min Mobile Height
    google.protobuf.Int32Value min_mobile_height = 15;
    // Mobile Settings Enabled
    bool mobile_settings_enabled = 16;
    // Mobile article id in settings panel
    google.protobuf.StringValue mobile_help_id = 17;
    // Editor setting version. optional values: 1 (old - deprecated) or 2 (new). default value is 2
    google.protobuf.Int32Value settings_version = 18 [(wix.api.min) = 1, (wix.api.max) = 2];
    // If setting version is 1, this will be the public link to the settings endpoint
    google.protobuf.StringValue settings_endpoint_url_v1 = 19;
    // A public link to the settings endpoint on ADI editor
    google.protobuf.StringValue on_boarding_settings_endpoint_url = 20;
    //The padding to use in different views
    Padding padding = 21;
    // The sub pages list for this component to be rendered in
    repeated SubPage sub_pages = 22;
    // toggle to mark whether the editor should revoke an app that contains this component.
    bool exclude_from_auto_revoke = 23;
    // Options to mark whether this page is replacing other page or is replaced by other page.
    PageReplaceOptions page_replace_options = 24;
    // Elements in the editor can be linked to this page (a button for example)
    google.protobuf.BoolValue linkable = 25;
    // Should add the page to site menu. defaults to true (will add the page to site menu)
    google.protobuf.BoolValue add_to_site_menu = 26;
    // Should allow multiple instances of the page (allow duplicate the page). defaults to false (will not allow multiple instances of the page)
    bool multi_instance_enabled = 27;
    // The component-type as will be written in Document Management.
    google.protobuf.StringValue component_type = 28 [(.wix.api.maxLength) = 512, (wix.api.field_exposure) = PRIVATE];
    // The type of the referenced schema e.g. `wysiwyg.viewer.components.tpapps.TPASection`.
    google.protobuf.StringValue ref_type = 29 [(.wix.api.maxLength) = 512, (wix.api.field_exposure) = PRIVATE];
    // if true, ssr will not cache pages that contain this page widget
    bool ssr_cache_excluded = 30 [(wix.api.field_exposure) = PRIVATE];
    // if true, when site member is logged in this page - ssr will not cache it
    bool site_members_ssr_cache_excluded = 31 [deprecated = true, (.wix.api.field_deprecated) = {
        replaced_by: "site_members_ssr_caching"
        target_removal_date: "2025-12-31"
    }, (wix.api.field_exposure) = INTERNAL];
    // Controls SSR caching behavior when site members are logged in
    SiteMembersSsrCaching site_members_ssr_caching = 32 [(wix.api.field_exposure) = INTERNAL];
}

message Padding {
    DisplayProperties desktop = 1;
    DisplayProperties tablet = 2;
    DisplayProperties mobile = 3;
}
