// flynt-disable field-lower-snake-case
// flynt-disable missing-array-limits
// flynt-disable missing-string-validations

syntax = "proto3";

package wix.rich_content.v1;

import "wix/rich_content/v1/common.proto";
import "google/protobuf/wrappers.proto";


message GalleryOptions {
  message Layout {
    enum Type {
      COLLAGE = 0; // Collage type
      MASONRY = 1; // Masonry type
      GRID = 2; // Grid type
      THUMBNAIL = 3; // Thumbnail type
      SLIDER = 4; // Slider type
      SLIDESHOW = 5; // Slideshow type
      PANORAMA = 6; // Panorama type
      COLUMN = 7; // Column type
      MAGIC = 8; // Magic type
      FULLSIZE = 9; // Fullsize images type
    }

    enum Orientation {
      ROWS = 0; // Rows Orientation
      COLUMNS = 1; // Columns Orientation
    }

    Type type = 1; // Gallery layout type.
    google.protobuf.BoolValue horizontal_scroll = 2; // Sets whether horizontal scroll is enabled. Defaults to `true` unless the layout `type` is set to `GRID` or `COLLAGE`.
    Orientation orientation = 3; // Gallery orientation.
    google.protobuf.Int32Value number_of_columns = 4; // The number of columns to display on full size screens.
    google.protobuf.Int32Value mobile_number_of_columns = 5; // The number of columns to display on mobile screens.
  }

  message ItemStyle {
    enum Crop {
      FILL = 0; // Crop to fill
      FIT = 1; // Crop to fit
    }
    google.protobuf.Int32Value target_size = 1; // Desirable dimension for each item in pixels (behvaior changes according to gallery type)
    google.protobuf.DoubleValue ratio = 2; // Item ratio
    Crop crop = 3; // Sets how item images are cropped.
    google.protobuf.Int32Value spacing = 4; // The spacing between items in pixels.
  }

  message Thumbnails {
    enum Alignment {
      TOP = 0; // Top alignment
      RIGHT = 1; // Right alignment
      BOTTOM = 2; // Bottom alignment
      LEFT = 3; // Left alignment
      NONE = 4; // No thumbnail
    }
    Alignment placement = 1; // Thumbnail alignment.
    google.protobuf.Int32Value spacing = 2; //Spacing between thumbnails in pixels.
  }

  Layout layout = 1; // Gallery layout.
  ItemStyle item = 2; // Styling for gallery items.
  Thumbnails thumbnails = 3; // Styling for gallery thumbnail images.
}

message GalleryData {
  message Item {
    message Video {
      Media media = 1; // Video file details.
      Media thumbnail = 2;  // Video thumbnail file details.
    }

    message Image {
      Media media = 1; // Image file details.
      Link link = 2; // Link details for images that are links.
    }

    oneof data {
      Image image = 1; // An image item.
      Video video = 2; // A video item.
    }
    google.protobuf.StringValue title = 3; // Item title.
    google.protobuf.StringValue altText = 4; // Item's alternative text.
  }

  PluginContainerData container_data = 1; // Styling for the gallery's container.
  repeated Item items = 2; // The items in the gallery.
  GalleryOptions options = 3; // Options for defining the gallery's appearance.
  google.protobuf.BoolValue disable_expand = 4; // Sets whether the gallery's expand button is disabled. Defaults to `false`.
  google.protobuf.BoolValue disable_download = 5; // Sets whether the gallery's download button is disabled. Defaults to `false`.
}
