// flynt-disable missing-deprecated-field-annotation
// flynt-disable missing-string-validations

syntax = "proto3";

package wix.rich_content.v1;

import "google/protobuf/wrappers.proto";

message TextStyle {
    enum TextAlignment {
        AUTO = 0; // browser default, eqivalent to `initial`
        LEFT = 1; // Left align
        RIGHT = 2; // Right align
        CENTER = 3; // Center align
        JUSTIFY = 4; // Text is spaced to line up its left and right edges to the left and right edges of the line box, except for the last line
    }

    TextAlignment text_alignment = 1; // Text alignment. Defaults to `AUTO`.
    google.protobuf.StringValue line_height = 2; // A CSS `line-height` value for the text expressed as a ratio relative to the font size. For example, if the font size is 20px, a `lineHeight` value of `'1.5'`` results in a line height of 30px.
}

message Link {
    message Rel {
        google.protobuf.BoolValue nofollow = 1; // Indicates to search engine crawlers not to follow the link. Defaults to `false`.
        google.protobuf.BoolValue sponsored = 2; // Indicates to search engine crawlers that the link is a paid placement such as sponsored content or an advertisement. Defaults to `false`.
        google.protobuf.BoolValue ugc = 3; // Indicates that this link is user-generated content and isn't necessarily trusted or endorsed by the page’s author. For example, a link in a fourm post. Defaults to `false`.
        google.protobuf.BoolValue noreferrer = 4; // Indicates that this link protect referral information from being passed to the target website.
    }
    enum Target {
        SELF = 0; // Opens the linked document in the same frame as it was clicked (this is default)
        BLANK = 1; // Opens the linked document in a new window or tab
        PARENT = 2; // Opens the linked document in the parent frame
        TOP = 3; // Opens the linked document in the full body of the window
    }

    oneof data {
        string url = 1; // The absolute URL for the linked document.
        string anchor = 2; // The target node's ID. Used for linking to another node in this object.
    }
    /*The HTML `target` attribute value for the link. This property defines where the linked document opens as follows:
    `SELF` - Default. Opens the linked document in the same frame as the link.
    `BLANK` - Opens the linked document in a new browser tab or window.
    `PARENT` - Opens the linked document in the link's parent frame.
    `TOP` - Opens the linked document in the full body of the link's browser tab or window.
    */
    Target target = 3;
    Rel rel = 4; // The HTML `rel` attribute value for the link. This object specifies the relationship between the current document and the linked document.
    google.protobuf.StringValue custom_data = 5; // A serialized object used for a custom or external link panel.
}

message PluginContainerData {
    message Spoiler {
        google.protobuf.BoolValue enabled = 1; // Sets whether the spoiler cover is enabled for this node. Defaults to `false`.
        google.protobuf.StringValue description = 2; // The description displayed on top of the spoiler cover.
        google.protobuf.StringValue button_text = 3; // The text for the button used to remove the spoiler cover.
    }
    message Width {
        enum Type {
            CONTENT = 0; // Width matches the content width
            SMALL = 1;  // Small Width
            ORIGINAL = 2; // Width will match the original asset width
            FULL_WIDTH = 3; // coast-to-coast display
        }
        oneof data {
            /* One of the following predefined width options:
            `CONTENT`: The width of the container matches the content width.
            `SMALL`: A small width.
            `ORIGINAL`: For `imageData` containers only. The width of the container matches the original image width.
            `FULL_WIDTH`: For `imageData` containers only. The image container takes up the full width of the screen.
            */
            Type size = 1;
            google.protobuf.StringValue custom = 2; // A custom width value in pixels.
        }
    }
    message Height {
        google.protobuf.StringValue custom = 1; // A custom height value in pixels.
    }
    enum Alignment {
        CENTER = 0; // Center Alignment
        LEFT = 1; // Left Alignment
        RIGHT = 2; // Right Alignment
    }

    Width width = 1; // The width of the node when it's displayed.
    Alignment alignment = 2; // The node's alignment within its container.
    Spoiler spoiler = 3; // Spoiler cover settings for the node.
    Height height = 4; // The height of the node when it's displayed.
    google.protobuf.BoolValue text_wrap = 5; // Sets whether text should wrap around this node when it's displayed. If `textWrap` is `false`, the node takes up the width of its container. Defaults to `true` for all node types except 'DIVIVDER' where it defaults to `false`.
}

message FileSource {
    oneof data {
        google.protobuf.StringValue url = 1; // The absolute URL for the file's source.
        google.protobuf.StringValue custom = 2 [deprecated = true]; // Custom ID. Use `id` instead.
        google.protobuf.StringValue id = 3; // An ID that's resolved to a URL by a resolver function.
    }
    google.protobuf.BoolValue private = 4; // Indicates whether the file's source is private. Defaults to `false`.
}

message Media {
    FileSource src = 1; // The source for the media's data.
    google.protobuf.Int32Value width = 2; // Media width in pixels.
    google.protobuf.Int32Value height = 3; // Media height in pixels.
    google.protobuf.DoubleValue duration = 4; // Media duration in seconds. Only relevant for audio and video files.
}

message PlaybackOptions {
    google.protobuf.BoolValue auto_play = 1; // Sets whether the media will automatically start playing.
    google.protobuf.BoolValue play_in_loop = 2; // Sets whether media's will be looped.
    google.protobuf.BoolValue show_controls = 3; // Sets whether media's controls will be shown.
}

message Oembed {
    google.protobuf.StringValue type = 1; // The resource type.
    google.protobuf.Int32Value width = 2; // The width of the resource specified in the `url` property in pixels.
    google.protobuf.Int32Value height = 3; // The height of the resource specified in the `url` property in pixels.
    google.protobuf.StringValue title = 4; // Resource title.
    google.protobuf.StringValue url = 5; // The source URL for the resource.
    google.protobuf.StringValue html = 6; // HTML for embedding a video player. The HTML should have no padding or margins.
    google.protobuf.StringValue author_name = 7; // The name of the author or owner of the resource.
    google.protobuf.StringValue author_url = 8; // The URL for the author or owner of the resource.
    google.protobuf.StringValue provider_name = 9; // The name of the resource provider.
    google.protobuf.StringValue provider_url = 10; // The URL for the resource provider.
    google.protobuf.StringValue thumbnail_url = 11; // The URL for a thumbnail image for the resource. If this property is defined, `thumbnailWidth` and `thumbnailHeight` must also be defined.
    google.protobuf.StringValue thumbnail_width = 12; // The width of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailHeight` must also be defined.
    google.protobuf.StringValue thumbnail_height = 13; // The height of the resource's thumbnail image. If this property is defined, `thumbnailUrl` and `thumbnailWidth`must also be defined.
    google.protobuf.StringValue video_url = 14; // The URL for an embedded viedo.
    google.protobuf.StringValue version = 15; // The oEmbed version number.  This value must be `1.0`.
}
