syntax = "proto2";

package maps_adv.geosmb.landlord.proto.services;

import "maps_adv/geosmb/landlord/proto/common.proto";

message Services {
  repeated ServiceItem items = 1;
}

message ServiceItem {
  enum ServiceItemType {
    PROMOTED = 1;
    MARKET = 2;
  }

  enum ServiceActionType {
    BOOKING_WITH_EMPLOYEE = 1;
    BOOKING_WITHOUT_EMPLOYEE = 2;
    REQUEST = 3;
    CALL = 4;
    LINK = 5;
  }

  required string name = 1;
  optional common.ImageTemplate image = 2;
  optional string description = 3;
  repeated string categories = 4;
  oneof cost_info {
      common.Decimal cost = 5;
      common.Decimal min_cost = 6;
  }
  required ServiceItemType type = 7;
  required uint64 id = 8;
  oneof duration_info {
      uint32 duration = 9;
      uint32 min_duration = 10;
  }
  optional ServiceActionType action_type = 11;
  optional string url = 12;
  optional ServiceActionTypeSettings service_action_type_settings = 13;
}

message ServiceActionTypeSettings {
    optional ServiceActionTypeSettingsLink link = 1;
}

message ServiceActionTypeSettingsLink {
    required string link = 1;
    required string button_text = 2;
}
