import { InobyComponentModule } from "@lib/inoby-module";
import GLightbox, { GLighboxInstance } from "glightbox";
import * as $ from "jquery";
import { GridGallerySettings } from "./grid-gallery.d";

class GridGalleryComponent extends InobyComponentModule {
  public metaboxId: string = "inoby-grid-gallery";
  private lightbox: GLighboxInstance = null;

  public run() {
    this.createLightbox();
  }

  public runAdmin() {
    $(".inoby-grid-gallery .gallery-item").on("click", (e) =>
      e.preventDefault()
    );
  }

  private createLightbox() {
    this.lightbox = GLightbox({
      selector: ".inoby-grid-gallery .glightbox-item",
    });
  }
}

new GridGalleryComponent().runOnReady();
