syntax = "proto3";

package com.wixpress.appservice.api;

import "components_catalog_data/unified_components/widget_size.proto";
import "wix/api/validations.proto";
import "wix/api/annotations.proto";
import "google/protobuf/wrappers.proto";

message Preset {
    // The id of the preset
    string id = 1  [(wix.api.minLength) = 1, (wix.api.maxLength) = 50];
    // Display name of the preset
    string name = 2 [(wix.api.minLength) = 1, (wix.api.maxLength) = 30, (wix.api.translatable) = {
        type: SHORT_TEXT
        name: "Name"
        grouping: "name"
    }];
    // Defines data for screen size for the preset
    Breakpoints breakpoints = 4;
    // URL of an image to show as the preset's thumbnail in the editor
    google.protobuf.StringValue thumbnail_url = 5 [(.wix.api.format) = WEB_URL];

    reserved 3;
}

message Breakpoints {
    // Defines data for small screen size
     Breakpoint small = 1;
    // Defines data for medium screen size
     Breakpoint medium = 2;
    // Defines data for large screen size
     Breakpoint large = 3;
}

message Breakpoint {
    // The size of the preset
    WidgetSize size = 1;
    // A different preset id to be used according to breakpoint
    string preset_id = 2 [(wix.api.maxLength) = 50];
}