syntax = "proto3";

package com.wixpress.appservice.api;

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

// A container (slot) that can be extended by other applications (e.g. widget slot or context menu slot)
message BackOfficeExtensionContainer {
  // Information about the type of slot.
  Extendable extendable = 1;
  // Platform that hosts the modal.
  // 
  // Must be `"BUSINESS_MANAGER"`.
  BackOfficeHostingPlatforms hosting_platform = 2 [(wix.api.field_exposure) = INTERNAL];

  // Default route for the container.
  google.protobuf.StringValue default_route = 3 [(.wix.api.maxLength) = 400];

  // A container (slot) common properties.
  SlotData slot_data = 4;
}

// Extensibility properties used by containers (slots)
message Extendable {
  // Type of component that this slot accepts.
  ExtendingComponentType extended_by = 1;

  // Which component types can be extended in containers
  enum ExtendingComponentType {
    INVALID = 0;
    BACK_OFFICE_MENU_ITEM = 2;
    BACK_OFFICE_EXTENSION_WIDGET = 3;

    reserved 1;
    reserved "BACK_OFFICE_WIDGET";
  }
}
