// flynt-disable enum-value-upper-case
syntax = "proto3";

package com.wixpress.appservice.api;
import "google/protobuf/wrappers.proto";
import "wix/api/annotations.proto";
import "wix/api/validations.proto";

message DisplayGroupTypeEnum {
  enum GroupType {
    UNKNOWN_GroupType = 0;
    cssDataType = 1;
    dataType = 2 [deprecated = true]; // Deprecated, use `data` instead;
    preset = 3 [deprecated = true]; // Deprecated, use `presets` instead
    data = 4;
    presets = 20;
    cssCustomProperties = 21;
    displayGroups = 25;

    // Style Shorthand Groups
    background = 5;
    margin = 6;
    padding = 7;
    border = 8;
    borderTop = 9;
    borderRight = 10;
    borderBottom = 11;
    borderLeft = 12;
    borderRadius = 13;
    borderInlineStart = 14;
    borderInlineEnd = 15;
    borderColor = 26;
    borderWidth = 27;
    borderStyle = 28;
    font = 16;
    textDecoration = 17;
    gap = 18;

    // Mixed Variables Groups
    text = 19;

    // Data Groups
    arrayItems = 22;
    arrayItem = 23 [deprecated = true]; // Deprecated, use `listItem` instead
    listItem = 24;
  }
}

message DisplayGroupItem {
  // Display name for this Group
  google.protobuf.StringValue display_name = 1 [(.wix.api.maxLength) = 20, (.wix.api.translatable) = {
    type: SHORT_TEXT
  }];
  // The type of the group, used to determine the group that will be displayed in the editor
  DisplayGroupTypeEnum.GroupType group_type = 2;
  
  reserved 4; // previously used for data_type
  reserved "data_type";
  reserved 5; // previously used for preset
  reserved "preset";
  
  oneof SelectedGroupType {
    option (.wix.api.aligned_with_enum) = {
      field: "group_type";
      suffix: "";
    };

    // A group that contains cssCustomProperties items that used one of the supported css-data-types (length, angle, number, ..._)
    ItemsGroup css_data_type = 3;
    // A group that contains data items
    ItemsGroup data = 6;
    // A group that contains preset items, which will be displayed in the editor as a category in the presets panel
    ItemsGroup presets = 24;
    // A group that contains cssCustomProperties items that use the same cssPropertyType, should be used mostly for ordering purposes
    ItemsGroup css_custom_properties = 25;
    // A group that contains other displayGroups items that use the same groupType,  should be used mostly for ordering purposes
    ItemsGroup display_groups = 26;
    // A group that contains background items
    ShorthandGroup.Background background = 7;
    // A group that contains margin items
    ShorthandGroup.Coordinates margin = 8;
    // A group that contains padding items
    ShorthandGroup.Coordinates padding = 9;
    // A group that contains border items
    ShorthandGroup.Border border = 10;
    // A group that contains border-top items
    ShorthandGroup.Border border_top = 11;
    // A group that contains border-right items
    ShorthandGroup.Border border_right = 12;
    // A group that contains border-bottom items
    ShorthandGroup.Border border_bottom = 13;
    // A group that contains border-left items
    ShorthandGroup.Border border_left = 14;
    // A group that contains border-inline-start items
    ShorthandGroup.Border border_inline_start = 15;
    // A group that contains border-inline-end items
    ShorthandGroup.Border border_inline_end = 16;
    // A group that contains border-radius items
    ShorthandGroup.Corners border_radius = 17;
    // A group that contains font items
    ShorthandGroup.Font font = 18;
    // A group that contains text-decoration items
    ShorthandGroup.TextDecoration text_decoration = 19;
    // A group that contains gap items
    ShorthandGroup.Gap gap = 20;
    // A group that contains border-color items
    ShorthandGroup.Coordinates border_color = 21;
    // A group that contains border-width items
    ShorthandGroup.Coordinates border_width = 22;
    // A group that contains border-style items
    ShorthandGroup.Coordinates border_style = 23;

    // a group that contains items related to text
    TextGroup text = 27;

    // A group that contains data-items related to arrayItems, will be used for enhancing the editor experience when editing them
    DataGroups.ArrayItems array_items = 31;
    // A group that contains common data-items that are used within array-item objects, will be used for enhancing the editor experience when editing them
    DataGroups.ListItem list_item = 32;
  }
  reserved 28, 29, 30; // Reserved for future shorthand groups
}

message ItemsGroup {
  // A list of items that should be in this group
  repeated string items = 1 [(.wix.api.maxSize) = 300, (.wix.api.maxLength) = 100];
}

message ShorthandGroup {
  message Background {
    // Stores the background-color property of the background shorthand
    google.protobuf.StringValue background_color = 1 [(.wix.api.maxLength) = 100];
    // Stores the background-image property of the background shorthand
    google.protobuf.StringValue background_image = 2 [(.wix.api.maxLength) = 100];
    // Stores the background-position property of the background shorthand
    google.protobuf.StringValue background_position = 3 [(.wix.api.maxLength) = 100];
    // Stores the background-size property of the background shorthand
    google.protobuf.StringValue background_size = 4 [(.wix.api.maxLength) = 100];
    // Stores the background-repeat property of the background shorthand
    google.protobuf.StringValue background_repeat = 5 [(.wix.api.maxLength) = 100];
    // Stores the background-origin property of the background shorthand
    google.protobuf.StringValue background_origin = 6 [(.wix.api.maxLength) = 100];
    // Stores the background-clip property of the background shorthand
    google.protobuf.StringValue background_clip = 7 [(.wix.api.maxLength) = 100];
    // Stores the background shorthand item itself, should be used when you want to achieve with this group partial editing of the background shorthand
    google.protobuf.StringValue background = 8 [(.wix.api.maxLength) = 100];
  }

  message Coordinates {
    // Stores the top coordinate of the property shorthand
    google.protobuf.StringValue top = 1 [(.wix.api.maxLength) = 100];
    // Stores the right coordinate of the property shorthand
    google.protobuf.StringValue right = 2 [(.wix.api.maxLength) = 100];
    // Stores the bottom coordinate of the property shorthand
    google.protobuf.StringValue bottom = 3 [(.wix.api.maxLength) = 100];
    // Stores the left coordinate of the property shorthand
    google.protobuf.StringValue left = 4 [(.wix.api.maxLength) = 100];
    // Stores the coordinates item of this shorthand
    google.protobuf.StringValue sides = 5 [(.wix.api.maxLength) = 100];
  }

  message Border {
    // Stores the width property of a border shorthand
    google.protobuf.StringValue width = 1 [(.wix.api.maxLength) = 100];
    // Stores the style property of a border shorthand
    google.protobuf.StringValue style = 2 [(.wix.api.maxLength) = 100];
    // Stores the color property of a border shorthand
    google.protobuf.StringValue color = 3 [(.wix.api.maxLength) = 100];
    // Stores the border shorthand item itself, should be used when you want to achieve with this group partial editing of the border shorthand
    google.protobuf.StringValue border = 4 [(.wix.api.maxLength) = 100];
  }

  message Corners {
    // Stores the top-left property of the shorthand
    google.protobuf.StringValue top_left = 1 [(.wix.api.maxLength) = 100];
    // Stores the top-right property of the shorthand
    google.protobuf.StringValue top_right = 2 [(.wix.api.maxLength) = 100];
    // Stores the bottom-right property of the shorthand
    google.protobuf.StringValue bottom_right = 3 [(.wix.api.maxLength) = 100];
    // Stores the bottom-left property of the shorthand
    google.protobuf.StringValue bottom_left = 4 [(.wix.api.maxLength) = 100];
    // Stores the corners item of this shorthand
    google.protobuf.StringValue corners = 5 [(.wix.api.maxLength) = 100];
  }

  message Font {
    // Stores the font-style property of the font shorthand
    google.protobuf.StringValue font_style = 1 [(.wix.api.maxLength) = 100];
    // Stores the font-variant property of the font shorthand
    google.protobuf.StringValue font_variant = 2 [(.wix.api.maxLength) = 100];
    // Stores the font-weight property of the font shorthand
    google.protobuf.StringValue font_weight = 3 [(.wix.api.maxLength) = 100];
    // Stores the font-size property of the font shorthand
    google.protobuf.StringValue font_size = 4 [(.wix.api.maxLength) = 100];
    // Stores the line-height property of the font shorthand
    google.protobuf.StringValue line_height = 5 [(.wix.api.maxLength) = 100];
    // Stores the font-family property of the font shorthand
    google.protobuf.StringValue font_family = 6 [(.wix.api.maxLength) = 100];
    // Stores the font shorthand item itself, should be used when you want to achieve with this group partial editing of the font shorthand
    google.protobuf.StringValue font = 7 [(.wix.api.maxLength) = 100];
  }

  message TextDecoration {
    // Stores the text-decoration-line property of the text-decoration shorthand
    google.protobuf.StringValue text_decoration_line = 1 [(.wix.api.maxLength) = 100];
    // Stores the text-decoration-color property of the text-decoration shorthand
    google.protobuf.StringValue text_decoration_color = 2 [(.wix.api.maxLength) = 100];
    // Stores the text-decoration-style property of the text-decoration shorthand
    google.protobuf.StringValue text_decoration_style = 3 [(.wix.api.maxLength) = 100];
    // Stores the text-decoration-thickness property of the text-decoration shorthand
    google.protobuf.StringValue text_decoration_thickness = 4 [(.wix.api.maxLength) = 100];
    // Stores the textDecoration shorthand item itself, should be used when you want to achieve with this group partial editing of the textDecoration shorthand
    google.protobuf.StringValue text_decoration = 5 [(.wix.api.maxLength) = 100];
  }

  message Gap {
    // Stores the row-gap property of the gap shorthand
    google.protobuf.StringValue row_gap = 1 [(.wix.api.maxLength) = 100];
    // Stores the column-gap property of the gap shorthand
    google.protobuf.StringValue column_gap = 2 [(.wix.api.maxLength) = 100];
    // Stores the gap shorthand item itself, should be used when you want to achieve with this group partial editing of the gap shorthand
    google.protobuf.StringValue gap = 7 [(.wix.api.maxLength) = 100];
  }
}

message DataGroups {
  message ArrayItems {
    // Stores the name of the 'arrayItems'
    google.protobuf.StringValue array_items = 1 [(.wix.api.maxLength) = 100];
    // Stores the data-item of the currently selected index within the array items
    google.protobuf.StringValue selected_item_index = 2 [(.wix.api.maxLength) = 100];
  }

  message ListItem {
    // Stores the name of the 'arrayItems' that stores the list of items
    google.protobuf.StringValue array_items = 1 [(.wix.api.maxLength) = 100];
    // Stores the key of the 'text' data-item that will be used for label of this list-item
    google.protobuf.StringValue label = 2 [(.wix.api.maxLength) = 100];
    // Stores the key of the 'text', 'link' or 'webUrl' data-item that will be used for subtitle of this list-item
    google.protobuf.StringValue subtitle = 3 [(.wix.api.maxLength) = 100];
    // Stores the key of the 'vectorArt' or 'image' data-item that will be used for thumbnail of this list-item
    google.protobuf.StringValue thumbnail = 4 [(.wix.api.maxLength) = 100];
  }
}

message TextGroup {
  // Stores the font shorthand item itself, should be used when you want to achieve with this group partial editing of the font shorthand
  google.protobuf.StringValue font = 1 [(.wix.api.maxLength) = 100];
  // Stores the font-style property for this text group
  google.protobuf.StringValue font_style = 2 [(.wix.api.maxLength) = 100];
  // Stores the font-variant property for this text group
  google.protobuf.StringValue font_variant = 3 [(.wix.api.maxLength) = 100];
  // Stores the font-weight property of the font shorthand
  google.protobuf.StringValue font_weight = 4 [(.wix.api.maxLength) = 100];
  // Stores the font-size property for this text group
  google.protobuf.StringValue font_size = 5 [(.wix.api.maxLength) = 100];
  // Stores the line-height property for this text group
  google.protobuf.StringValue line_height = 6 [(.wix.api.maxLength) = 100];
  // Stores the font-family property for this text group
  google.protobuf.StringValue font_family = 7 [(.wix.api.maxLength) = 100];
  // Stores the color property for this text group
  google.protobuf.StringValue color = 8 [(.wix.api.maxLength) = 100];
  // Stores the letter-spacing property for this text group
  google.protobuf.StringValue letter_spacing = 9 [(.wix.api.maxLength) = 100];
  // Stores the text-align property for this text group
  google.protobuf.StringValue text_align = 10 [(.wix.api.maxLength) = 100];
  // Stores the text-transform property for this text group
  google.protobuf.StringValue text_transform = 11 [(.wix.api.maxLength) = 100];
  // Stores the text-shadow property for this text group
  google.protobuf.StringValue text_shadow = 12 [(.wix.api.maxLength) = 100];
  // Stores the text-decoration-line property for this text group
  google.protobuf.StringValue text_decoration_line = 13 [(.wix.api.maxLength) = 100];
  // Stores the writing-mode property for this text group
  google.protobuf.StringValue writing_mode = 14 [(.wix.api.maxLength) = 100];
  // Stores the direction data-item for this text group
  google.protobuf.StringValue direction = 15 [(.wix.api.maxLength) = 100];
  // Stores the a11y data-item for this text group
  google.protobuf.StringValue a11y = 16 [(.wix.api.maxLength) = 100];
}
