syntax = "proto2";

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

package maps_adv.geosmb.landlord.proto.preferences;

message Preferences {
  optional string personal_metrika_code = 1;  // specified by user in UI
  optional string external_metrika_code = 2;  // obtained from geo-search
  repeated counters.GoogleAdsCounter google_counters = 3; // GoogleAds counters obtained from geoprod/YT
  repeated counters.TikTokPixel tiktok_pixels = 4; // TikTok pixel counter
  repeated counters.VkPixel vk_pixels = 5; // VKontakte pixel counter

  required ColorTheme color_theme = 10;

  optional CTAButton cta_button = 20;
  optional bool cart_enabled = 21 [default=false];
  repeated SocialButton social_buttons = 22;
}

message ColorTheme {
  enum ColorTone {
    LIGHT = 1;
    DARK = 2;
  }

  required ColorTone theme = 1;
  required string main_color_hex = 2;  // FFD353, 00E087, 6951FF, FB524F, 3083FF
  required ColorTone text_color_over_main = 3;
  optional string main_color_name = 4; //YELLOW, GREEN, VIOLET, RED, BLUE
}

message CTAButton {
  enum PredefinedType {
    BOOK_TABLE = 1;  // Забронировать столик
    BOOK_ONLINE = 2;  // Записаться онлайн
    CALL = 3;  // Позвонить
    MAKE_ROUTE = 4;  // Построить маршрут
    ORDER_DELIVERY = 5;  // Заказать доставку
    REQUEST = 6;  // Заявка
    BOOK_MAPS = 7; // Записаться онлайн, виджет карт
  }

  oneof button_type {
    PredefinedType predefined = 1;
    string custom = 2;  // user-defined name for custom button
  }
  required string value = 10;  // some url
}

message SocialButton {
    enum Type {
        VK = 1;
        ZEN = 2;
        INSTAGRAM = 3;
        TELEGRAM = 4;
    }
    required Type type = 1;
    required string url = 2;
    optional string custom_text = 3;
}
