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/number_of_columns.proto";

message CheckboxGroup {
    option (.wix.api.decomposite_of) = "wix.forms.v4.components.CheckboxGroup";
  reserved 3, 4, 5, 6;
  // Label of the field
  google.protobuf.StringValue label = 1 [(.wix.api.maxLength) = 350, (.wix.api.translatable) = {
    name: "Checkbox Label"
    hidden: false
    grouping: "formFields"
    type: SHORT_TEXT
  }];
  // Description of the field
  .wix.rich_content.v1.RichContent description = 2[(.wix.api.translatable) = {
    name: "Checkbox 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.
  CustomOption custom_option = 9;
  // Specifies the number of columns used to display the selections within the component.
  // Default: ONE
  com.wixpress.appservice.api.upstream.wix.forms.v4.components.common.NumberOfColumnsEnum.NumberOfColumns number_of_columns = 10;


  message CustomOption {
        option (.wix.api.decomposite_of) = "wix.forms.v4.components.CheckboxGroup.CustomOption";
    // Label of custom option input
    google.protobuf.StringValue label = 1 [(.wix.api.maxLength) = 350, (.wix.api.translatable) = {
      name: "Checkbox Custom Option Label"
      hidden: false
      grouping: "formFields"
      type: SHORT_TEXT
    }];
    // Placeholder of custom option input
    google.protobuf.StringValue placeholder = 2 [(.wix.api.maxLength) = 100, (.wix.api.translatable) = {
      name: "Checkbox Custom Option Placeholder"
      hidden: false
      grouping: "formFields"
      type: SHORT_TEXT
    }];
  }

  message Option {
        option (.wix.api.decomposite_of) = "wix.forms.v4.components.CheckboxGroup.Option";
    // Selectable option label
    google.protobuf.StringValue label = 1 [(.wix.api.maxLength) = 400, (.wix.api.translatable) = {
      name: "Checkbox Option Label"
      hidden: false
      grouping: "formFields"
      type: SHORT_TEXT
    }];
    // Selectable option value, which is saved to DB.
    google.protobuf.Value value = 2;
    // 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];
    // Media item. Media, associated with option, like image.
    com.wixpress.appservice.api.upstream.wix.forms.v4.components.common.MediaItem media = 5;
  }
}
