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

package com.wixpress.appservice.api;
import "google/protobuf/struct.proto";
import "google/protobuf/wrappers.proto";
import "wix/api/validations.proto";
import "wix/api/annotations.proto";
import "components_catalog_data/editor_react_component/css_property.proto";
import "components_catalog_data/editor_react_component/css_property_types.proto";

// DEPRECATED: This enum is deprecated and will be removed in the future, add new types in css_properties.proto
message CssPropertyTypeEnum {
  // The supported [CSS Property Types](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference#index) in Javascript naming format 
  enum CssPropertyType {
    UNKNOWN_CssPropertyType = 0;

    // background properties
    background = 1;
    backgroundSize = 2;
    backgroundColor = 3;
    backgroundImage = 4;
    backgroundClip = 5;
    backgroundOrigin = 6;
    backgroundPosition = 7;
    backgroundRepeat = 8;
    backgroundAttachment = 72;
    fill = 96;
    fillOpacity = 73;

    // margin properties
    margin = 9;
    marginTop = 10;
    marginRight = 11;
    marginBottom = 12;
    marginLeft = 13;
    marginInlineStart = 74;
    marginInlineEnd = 75;

    // padding properties
    padding = 14;
    paddingTop = 15;
    paddingRight = 16;
    paddingBottom = 17;
    paddingLeft = 18;
    paddingInlineStart = 76;
    paddingInlineEnd = 77;

    // border properties
    border = 19;
    borderWidth = 20;
    borderStyle = 21;
    borderColor = 22;

    borderTop = 23;
    borderTopColor = 24;
    borderTopWidth = 25;
    borderTopStyle = 26;

    borderRight = 27;
    borderRightColor = 28;
    borderRightWidth = 29;
    borderRightStyle = 30;

    borderBottom = 31;
    borderBottomColor = 32;
    borderBottomWidth = 33;
    borderBottomStyle = 34;

    borderLeft = 35;
    borderLeftColor = 36;
    borderLeftWidth = 37;
    borderLeftStyle = 38;

    borderInlineStart = 78;
    borderInlineStartColor = 79;
    borderInlineStartWidth = 80;
    borderInlineStartStyle = 81;

    borderInlineEnd = 82;
    borderInlineEndColor = 83;
    borderInlineEndWidth = 84;
    borderInlineEndStyle = 85;

    borderRadius = 39;
    borderTopLeftRadius = 40;
    borderTopRightRadius = 41;
    borderBottomRightRadius = 42;
    borderBottomLeftRadius = 43;

    borderStartStartRadius = 86;
    borderStartEndRadius = 87;
    borderEndStartRadius = 88;
    borderEndEndRadius = 89;

    // text properties
    font = 44;
    fontFamily = 45;
    fontSize = 46;
    fontStretch = 47;
    fontStyle = 48;
    fontVariant = 49;
    fontWeight = 50;
    lineHeight = 51;

    color = 52;
    letterSpacing = 53;
    writingMode = 101;
    textAlign = 54;
    textTransform = 55;
    textShadow = 56;
    textOverflow = 97;
    textIndent = 105;

    textDecoration = 57;
    textDecorationColor = 58;
    textDecorationLine = 59;
    textDecorationStyle = 60;
    textDecorationThickness = 61;

    // general box properties
    boxShadow = 62;
    opacity = 63;
    overflow = 71;

    // layout properties
    display = 100;
    alignSelf = 64;
    justifyContent = 65;
    alignItems = 66;
    flexDirection = 67;
    gap = 68;
    height = 69;
    width = 70;
    columnGap = 98;
    rowGap = 99;

    // filters
    filter = 90;
    backdropFilter = 91;

    // media sizing & alignment
    objectFit = 92;
    objectPosition = 93;

    // blending & compositing
    mixBlendMode = 94;
    isolation = 95;

    // stroke properties
    stroke = 102;
    strokeWidth = 103;
    strokeOpacity = 104;
  }
}

// DEPRECATED: This enum is deprecated and will be removed in the future, add new types in css_properties.proto
message CssVariableTypeEnum {
  // The supported [CSS Data Types](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Types) in Javascript naming format 
  enum CssDataType {
    UNKNOWN_CssDataType = 0;
    number = 1;
    length = 2;
    color = 3;
    angle = 4;
    percentage = 5;
    lengthPercentage = 7;
    blendMode = 6;
    customEnum = 8;
    string = 9;
    time = 10;
  }
}

// DEPRECATED: This message is deprecated and will be removed in the future, add new types and definitions in css_properties.proto
message StyleItem {
  oneof SelectedItemType {
    // DEPRECATED: use cssProperties or cssCustomProperties depends if you need this as inline css-property or as a css variable
    CssPropertyTypeEnum.CssPropertyType css_property_type = 1 [deprecated = true, (.wix.api.field_deprecated) = {
      replaced_by: "cssProperties or cssCustomProperties depends if you need this as inline css-property or as a css variable";
      target_removal_date: "2025-08-01"
    }];
    // DEPRECATED: use cssCustomProperties instead
    CssVariableTypeEnum.CssDataType css_variable_type = 2  [deprecated = true, (.wix.api.field_deprecated) = {
      replaced_by: "cssCustomProperties";
      target_removal_date: "2025-08-01"
    }];
  }

  // The type of the style-item, used to define the type of the css property or css variable
  StyleTypeEnum.StyleType style_type = 15 [deprecated=true, (.wix.api.field_deprecated) = {
    replaced_by: "cssPropertyType or cssVariableType";
    target_removal_date: "2025-08-01"
  }];
  // The default value for the style-item when the component is in the "regular" state
  google.protobuf.Value default_value = 3;
  // The default values for the style-item when the component is in one of the defined states
  map<string, google.protobuf.Value> states_default_values = 14;
  // Will be used as displayName of this style-item
  google.protobuf.StringValue display_name = 4 [(.wix.api.maxLength) = 100, (.wix.api.translatable) = {
    type: SHORT_TEXT
  }];
  // DEPRECATED - use cssCustomProperties instead
  google.protobuf.BoolValue css_custom_property = 12 [deprecated = true, (.wix.api.field_deprecated) = {
    replaced_by: "cssCustomProperties";
    target_removal_date: "2025-08-01"
  }];

  // Whether this style-item is deprecated
  bool deprecated = 9 [(wix.api.field_exposure) = INTERNAL];

  oneof SelectedCssPropertyType {
    // Additional options to refine the filter variable
    Filter filter = 5;
    // Additional options to refine the backdropFilter variable
    BackdropFilter backdrop_filter = 6;
    // Additional options to refine the display variable
    Display display = 8;
    // Additional options to refine the writingMode variable
    WritingMode writing_mode = 10;
    // Additional options to refine the background variable
    Background background = 13;
  }

  oneof SelectedCssVariableType {
    // Additional options to refine the customEnum style item
    CustomEnum custom_enum = 7;
    // Additional options to refine the number style item
    CssNumber number = 11;
  }
}

// DEPRECATED: This message is deprecated and will be removed in the future
message StyleItemDefaults {
  // The default value of this style item
  google.protobuf.Value default_value = 1;
  // The default values for the style-item when the component is in one of the defined states
  map<string, google.protobuf.Value> states_default_values = 2;
}

// DEPRECATED: This message is deprecated and will be removed in the future
message StyleItemOverrides {
  // Disables the ability to edit this style-item
  google.protobuf.BoolValue disable_editing = 1;
  // Overrides the default value of this style-item
  google.protobuf.Value default_value = 2;
  // Overrides the default values for the style-item when the component is in one of the defined states
  map<string, google.protobuf.Value> states_default_values = 3;
  // Overrides Display displayName of this style-item
  google.protobuf.StringValue display_name = 4 [(.wix.api.maxLength) = 100, (.wix.api.translatable) = {
    type: SHORT_TEXT
  }];
}


// DEPRECATED: This message is deprecated and will be removed in the future
message CustomEnum {
  // DEPRECATED: use cssDataType instead
  CssVariableTypeEnum.CssDataType css_variable_type = 1 [deprecated = true, (.wix.api.field_deprecated) = {
    replaced_by: "cssDataType";
    target_removal_date: "2025-08-01"
  }];
  // The type of the custom enum, used to define the type of the values allowed in the enum
  CssDataTypeEnum.CssDataType css_data_type = 3;
  // The allowed value options for this custom enum
  repeated CustomEnumOption options = 2 [(.wix.api.maxSize) = 100];
}

// DEPRECATED: This message is deprecated and will be removed in the future
message CustomEnumOption {
  // the enum value
  string value = 1 [(.wix.api.maxLength) = 100];
  // Will be used as displayName of this enum option
  string display_name = 2 [(.wix.api.maxLength) = 100, (.wix.api.translatable) = {
    type: SHORT_TEXT
  }];
  // the css-properties to apply when this enum value is selected [Internal use only]
  repeated CustomEnumOptionCssProperty applied_styles = 3 [(.wix.api.maxSize) = 100, (.wix.api.field_exposure) = INTERNAL];
}

// DEPRECATED: This message is deprecated and will be removed in the future
message CustomEnumOptionCssProperty {
  // the css property
  string property = 1 [(.wix.api.maxLength) = 100];
  // the css value
  string value = 2 [(.wix.api.maxLength) = 300];
}