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

message ProductCheckboxGroup {
  option (.wix.api.decomposite_of) = "wix.forms.v4.components.ProductCheckboxGroup";
  // 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 = 3 [(.wix.api.maxSize) = 400];
  // Flag identifying to hide or not label
  // Default: true
  google.protobuf.BoolValue show_label = 4;
  // Defines how an image should be resized to fit within its option.
  // Default: COVER
  com.wixpress.appservice.api.upstream.wix.forms.v4.components.common.ImageFitEnum.ImageFit image_fit = 5;

  message Option {
    option (.wix.api.decomposite_of) = "wix.forms.v4.components.ProductCheckboxGroup.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. Corresponds to product id, found in field's products list.
    google.protobuf.Value value = 2;
    // Option id. Used as binding for translations.
    string id = 3 [(.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 = 4;
    // Flag identifying that option should be selected by default
    bool default = 5;
  }
}
