syntax = "proto3";

package com.wixpress.appservice.api.upstream.wix.forms.v4.components;
option java_package = "com.wixpress.appservice.api.upstream.wix.forms.v4.components";

import "google/protobuf/wrappers.proto";
import "wix/api/validations.proto";
import "wix/api/annotations.proto";
import "wix/rich_content/v1/rich_content.proto";
import "components_catalog_data/form_template/com/wixpress/appservice/api/upstream/wix/forms/v4/components/common/media_item.proto";
import "components_catalog_data/form_template/com/wixpress/appservice/api/upstream/wix/forms/v4/components/common/media_settings.proto";
import "components_catalog_data/form_template/com/wixpress/appservice/api/upstream/wix/forms/v4/components/common/custom_option.proto";

message Dropdown {
    option (.wix.api.decomposite_of) = "wix.forms.v4.components.Dropdown";
  reserved 3, 4, 5, 6;
  // Label of the field
  google.protobuf.StringValue label = 1 [(.wix.api.maxLength) = 350, (.wix.api.translatable) = {
    name: "Dropdown Label"
    hidden: false
    grouping: "formFields"
    type: SHORT_TEXT
  }];
  // Description of the field
  .wix.rich_content.v1.RichContent description = 2 [(.wix.api.translatable) = {
    name: "Dropdown Description"
    hidden: false
    grouping: "formFields"
    type: RICH_CONTENT_EDITOR
  }];
  // List of options to select from
  repeated Option options = 7 [(.wix.api.maxSize) = 400];
  // Flag identifying to hide or not label
  // Default: true
  google.protobuf.BoolValue show_label = 8;
  // Option which can be specified by UoU, enabled when this object is specified.
  components.common.CustomOption custom_option = 9;

  // Placeholder of dropdown input
  google.protobuf.StringValue placeholder = 10 [(.wix.api.maxLength) = 100, (.wix.api.translatable) = {
    name: "Dropdown Placeholder"
    hidden: false
    grouping: "formFields"
    type: SHORT_TEXT
  }];
  // Media item. Media, associated with field, like image.
  components.common.MediaItem media = 11;
  // Settings for media item
  components.common.MediaSettings media_settings = 12;

  message Option {
        option (.wix.api.decomposite_of) = "wix.forms.v4.components.Dropdown.Option";
    // Selectable option label
    google.protobuf.StringValue label = 1 [(.wix.api.maxLength) = 400, (.wix.api.translatable) = {
      name: "Dropdown Option Label"
      hidden: false
      grouping: "formFields"
      type: SHORT_TEXT
    }];
    // Selectable option value, which is saved to DB.
    google.protobuf.StringValue value = 2 [(.wix.api.maxLength) = 20000];
    // Flag identifying that option should be selected by default
    bool default = 3;
    // Option id. Used as binding for translations
    string id = 4 [(.wix.api.format) = GUID, (.wix.api.immutable) = true];
  }
}
