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 "google/protobuf/struct.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";
import "components_catalog_data/form_template/com/wixpress/appservice/api/upstream/wix/forms/v4/components/common/number_of_columns.proto";

message DonationInput {
    option (.wix.api.decomposite_of) = "wix.forms.v4.components.DonationInput";
  // Label of the field.
  google.protobuf.StringValue label = 1 [(.wix.api.maxLength) = 350, (.wix.api.translatable) = {
    name: "Donation Input Label"
    hidden: false
    grouping: "formFields"
    type: SHORT_TEXT
  }];

  // Description of the field.
  .wix.rich_content.v1.RichContent description = 2 [(.wix.api.translatable) = {
    name: "Donation Input Description"
    hidden: false
    grouping: "formFields"
    type: RICH_CONTENT_EDITOR
  }];

  // List of options to select from.
  repeated Option options = 3 [(.wix.api.maxSize) = 400];

  // Option which can be specified by UoU, enabled when this object is specified.
  components.common.CustomOption custom_option = 4;

  // Specifies the number of columns used to display the selections within the component.
  // Default: ONE
  components.common.NumberOfColumnsEnum.NumberOfColumns number_of_columns = 5;

  // Flag identifying to hide or not label
  // Default: true
  google.protobuf.BoolValue show_label = 6;
  // Media item. Media, associated with field, like image.
  components.common.MediaItem media = 7;
  // Settings for media item
  components.common.MediaSettings media_settings = 8;

  message Option {
        option (.wix.api.decomposite_of) = "wix.forms.v4.components.DonationInput.Option";
    // Selectable option value, which is saved to DB. Corresponds to product id, found in field's products list.
    string value = 1 [(.wix.api.format) = GUID];
    // Flag identifying that option should be selected by default
    bool default = 2;
  }
}
