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

syntax = "proto3";

package wix.rich_content.v1;

import "wix/api/annotations.proto";
import "wix/api/validations.proto";
import "wix/rich_content/v1/common.proto";
import "google/protobuf/wrappers.proto";

message AppEmbedData {
    message ButtonStyles {
        google.protobuf.StringValue button_text = 1; // Text to display on the button.
        
        google.protobuf.Int32Value border_width = 2; // Border width in pixels.
        google.protobuf.Int32Value border_radius = 3; // Border radius in pixels.
        google.protobuf.StringValue border_color = 4 [(wix.api.format) = COLOR_HEX]; // Border color as a hexadecimal value.
        google.protobuf.StringValue text_color = 5 [(wix.api.format) = COLOR_HEX]; // Text color as a hexadecimal value.
        google.protobuf.StringValue background_color = 6 [(wix.api.format) = COLOR_HEX]; // Background color as a hexadecimal value.
        
        google.protobuf.StringValue border_color_hover = 7 [(wix.api.format) = COLOR_HEX]; // Border color as a hexadecimal value (hover state).
        google.protobuf.StringValue text_color_hover = 8 [(wix.api.format) = COLOR_HEX]; // Text color as a hexadecimal value (hover state).
        google.protobuf.StringValue background_color_hover = 9 [(wix.api.format) = COLOR_HEX]; // Background color as a hexadecimal value (hover state).
        
        google.protobuf.StringValue button_size = 10; // Button size option, one of `SMALL`, `MEDIUM` or `LARGE`. Defaults to `MEDIUM`.
    }

    message ImageStyles {
        google.protobuf.BoolValue hide_image = 1; // Whether to hide the image.
        
        enum Position {
            START = 0; // Image positioned at the start (left in LTR layouts, right in RTL layouts)
            END = 1; // Image positioned at the end (right in LTR layouts, left in RTL layouts)
            TOP = 2; // Image positioned at the top
        }
        
        enum AspectRatio {
            SQUARE = 0; // 1:1 aspect ratio
            RECTANGLE = 1; // 16:9 aspect ratio
        }
        
        enum Resizing {
            FILL = 0; // Fill the container, may crop the image
            FIT = 1; // Fit the image within the container
        }
        
        Position image_position = 2; // Position of image. Defaults to `START`.
        AspectRatio aspect_ratio = 3; // Aspect ratio for the image. Defaults to `SQUARE`.
        Resizing resizing = 4; // How the image should be resized. Defaults to `FILL`.
        
        google.protobuf.StringValue border_color = 5 [(wix.api.format) = COLOR_HEX]; // Image border color as a hexadecimal value.
        google.protobuf.Int32Value border_width = 6; // Image border width in pixels.
        google.protobuf.Int32Value border_radius = 7; // Image border radius in pixels.
    }

    message RibbonStyles {
        google.protobuf.StringValue ribbon_text = 1; // Text to display on the ribbon.
        
        enum Placement {
            IMAGE = 0; // Ribbon placed on the image
            PRODUCT_INFO = 1; // Ribbon placed on the product information
        }
        
        google.protobuf.StringValue background_color = 2 [(wix.api.format) = COLOR_HEX]; // Ribbon background color as a hexadecimal value.
        google.protobuf.StringValue text_color = 3 [(wix.api.format) = COLOR_HEX]; // Ribbon text color as a hexadecimal value.
        google.protobuf.StringValue border_color = 4 [(wix.api.format) = COLOR_HEX]; // Ribbon border color as a hexadecimal value.
        google.protobuf.Int32Value border_width = 5; // Ribbon border width in pixels.
        google.protobuf.Int32Value border_radius = 6; // Ribbon border radius in pixels.
        Placement ribbon_placement = 7; // Placement of the ribbon. Defaults to `IMAGE`.
    }

    message CardStyles {
        enum Type {
            CONTAINED = 0; // Card with visible border and background
            FRAMELESS = 1; // Card without visible border
        }
        
        enum Alignment {
            START = 0; // Content aligned to start (left in LTR layouts, right in RTL layouts)
            CENTER = 1; // Content centered
            END = 2; // Content aligned to end (right in LTR layouts, left in RTL layouts)
        }
        
        enum Layout {
            STACKED = 0; // Elements stacked vertically
            SIDE_BY_SIDE = 1; // Elements arranged horizontally
        }
        
        google.protobuf.StringValue background_color = 1 [(wix.api.format) = COLOR_HEX]; // Card background color as a hexadecimal value.
        google.protobuf.StringValue border_color = 2 [(wix.api.format) = COLOR_HEX]; // Card border color as a hexadecimal value.
        google.protobuf.Int32Value border_width = 3; // Card border width in pixels.
        google.protobuf.Int32Value border_radius = 4; // Card border radius in pixels.
        
        Type type = 5; // Card type. Defaults to `CONTAINED`.
        Alignment alignment = 6; // Content alignment. Defaults to `START`.
        Layout title_price_layout = 7; // Layout for title and price. Defaults to `STACKED`.
        
        google.protobuf.StringValue title_color = 9 [(wix.api.format) = COLOR_HEX]; // Title text color as a hexadecimal value.
        google.protobuf.StringValue text_color = 10 [(wix.api.format) = COLOR_HEX]; // Text color as a hexadecimal value.
    }

    message BookingData {
        google.protobuf.StringValue durations = 1; // Booking duration in minutes.
    }

    message EventData {
        google.protobuf.StringValue scheduling = 1; // Event schedule.
        google.protobuf.StringValue location = 2; // Event location.
    }

    enum AppType {
        PRODUCT = 0;
        EVENT = 1;
        BOOKING = 2;
    }

    message PricingData {
        google.protobuf.StringValue value_from = 1 [(wix.api.decimalValue) = { maxScale: 2 }]; // Minimum numeric price value as string (e.g., "10.99").
        google.protobuf.StringValue value_to = 2 [(wix.api.decimalValue) = { maxScale: 2 }]; // Maximum numeric price value as string (e.g., "19.99").
        google.protobuf.StringValue discounted_value = 3 [(wix.api.decimalValue) = { maxScale: 2 }]; // Numeric price value as string after discount application (e.g., "15.99").
        google.protobuf.StringValue currency = 4 [(wix.api.format) = CURRENCY]; // Currency of the value in ISO 4217 format (e.g., "USD", "EUR").
        google.protobuf.StringValue pricing_plan_id = 5 [(wix.api.format) = GUID]; // Pricing plan ID.
    }

    AppType type = 1; // The type of Wix App content being embedded.
    google.protobuf.StringValue item_id = 2; // The ID of the embedded content.
    google.protobuf.StringValue name = 3; // The name of the embedded content.
    google.protobuf.StringValue image_src = 4 [deprecated = true]; // Deprecated: Use `image` instead.
    google.protobuf.StringValue url = 5; // The URL for the embedded content.

    Media image = 8; // An image for the embedded content.

    oneof appData {
        BookingData booking_data = 6; // Data for embedded Wix Bookings content.
        EventData event_data = 7; // Data for embedded Wix Events content.
    }

    google.protobuf.BoolValue hide_image = 9; // Whether to hide the image.
    google.protobuf.BoolValue hide_title = 10; // Whether to hide the title.
    google.protobuf.BoolValue hide_price = 11; // Whether to hide the price.
    google.protobuf.BoolValue hide_description = 12; // Whether to hide the description (Event and Booking).
    google.protobuf.BoolValue hide_date_time = 13; // Whether to hide the date and time (Event).
    google.protobuf.BoolValue hide_location = 14; // Whether to hide the location (Event).
    google.protobuf.BoolValue hide_duration = 15; // Whether to hide the duration (Booking).
    google.protobuf.BoolValue hide_button = 16; // Whether to hide the button.
    google.protobuf.BoolValue hide_ribbon = 17; // Whether to hide the ribbon.

    ButtonStyles button_styles = 18; // Button styling options.
    ImageStyles image_styles = 19; // Image styling options.
    RibbonStyles ribbon_styles = 20; // Ribbon styling options.
    CardStyles card_styles = 21; // Card styling options.

    PluginContainerData container_data = 22; // Styling for the app embed's container.
    PricingData pricing_data = 23; // Pricing data for embedded Wix App content.
}

