syntax = "proto3";

package com.wixpress.appservice.api;

import "google/protobuf/wrappers.proto";
import "wix/api/validations.proto";
import "wix/api/annotations.proto";
import "components_catalog_common.proto";
import "components_catalog_data/dts_definition_reference.proto";

// Definitions of common slots properties
message SlotData {
  // Slot display name.
  google.protobuf.StringValue display_name = 1 [(.wix.api.maxLength) = 400];
  // Slot description.
  google.protobuf.StringValue description = 2 [(.wix.api.maxLength) = 400];
  // Parameters for the slot.
  SlotParams slot_params = 3;
  // HTTP links to a markdown files.
  repeated string md_http_links = 4 [(wix.api.maxSize) = 100, (.wix.api.format) = WEB_URL];
  
  SlotDataType type = 5;
  
  oneof slot_type {
    // Widget-specific slot.
    WidgetSlot widget_options = 6;
    // Menu-specific slot.
    // flynt-disable no-oneof-empty-markers
    MenuSlot menu_options = 7;
  }
  // Specifying the visibility level and maturity stage
  // flynt-disable renamed-field-breaking-change
  ExtensionExposure exposure_and_maturity = 8 [(.wix.api.field_exposure) = INTERNAL];

  enum SlotDataType {
    UNKNOWN = 0 [(.wix.api.enum_maturity) = NOT_IMPLEMENTED];
    WIDGET = 1;
    MENU = 2;
  }


  message SlotParams {
    // DTS reference for the slot parameters.
    DtsDefinitionReference slot_params_dts_reference = 1;
    // Named export to use.
    google.protobuf.StringValue named_export = 2 [(.wix.api.maxLength) = 400];
  }
  
  message MenuSlot {
    // MenuSlot can be extended with specific properties as needed.
  }
  
  message WidgetSlot {
    // Blocks specific data.
    BlocksData blocks_data = 1;
  }
  
  message BlocksData {
    // Maximum allowed dimensions.
    Dimension max_dimensions_pixels = 1;
    // Minimum allowed dimensions.
    Dimension min_dimensions_pixels = 2;
    // Slot placeholder component ID in the document.
    google.protobuf.StringValue comp_ref_id = 3 [(.wix.api.maxLength) = 50];
  }
  
  
  message Dimension {
    // Width of the component (max: 9999).
    google.protobuf.Int32Value width = 1 [(.wix.api.max) = 9999];
    // Height of the component (max: 9999).
    google.protobuf.Int32Value height = 2 [(.wix.api.max) = 9999];
  }
}


