text: /**
   * Copyright 2018 The Pennsylvania State University
   * @license Apache-2.0, see License.md for full text.
   */
  import{html as e,css as r}from"../../../lit-element/lit-element.js";import{SimpleColors as l}from"../../simple-colors/simple-colors.js";import"../../../@polymer/iron-image/iron-image.js";import"../../../@polymer/iron-icons/iron-icons.js";import"../../simple-tooltip/simple-tooltip.js";class LrndesignGalleryBehaviors extends l{static get tag(){return"lrndesign-gallery-behaviors"}static get styles(){return[...super.styles,r`
          :host {
            display: block;
            border-radius: var(--lrndesign-gallery-border-radius, 0px);
            box-shadow: var(--lrndesign-gallery-box-shadow, unset);
          }
  
          :host([hidden]) {
            display: none;
          }
          :host {
            display: block;
            --lrndesign-gallery-color: var(--simple-colors-default-theme-grey-12);
            --lrndesign-gallery-background-color: var(
              --simple-colors-default-theme-grey-1
            );
            --lrndesign-gallery-focus-color: var(
              --simple-colors-default-theme-accent-9
            );
            --lrndesign-gallery-border-color: var(
              --simple-colors-default-theme-grey-4
            );
            --lrndesign-gallery-thumbnail-outline: 1px solid
              var(--simple-colors-default-theme-grey-12);
  
            --lrndesign-gallery-dialog-color: var(
              --simple-colors-default-theme-grey-12
            );
            --lrndesign-gallery-dialog-background-color: var(
              --simple-colors-default-theme-grey-1
            );
            --lrndesign-gallery-dialog-titlebar-color: var(
              --simple-colors-default-theme-grey-1
            );
            --lrndesign-gallery-dialog-titlebar-background-color: var(
              --simple-colors-default-theme-accent-9
            );
            --lrndesign-gallery-dialog-header-color: var(
              --simple-colors-default-theme-grey-12
            );
            --lrndesign-gallery-dialog-header-background-color: var(
              --simple-colors-default-theme-grey-2
            );
            --lrndesign-gallery-carousel-next-bg: linear-gradient(
              to right,
              rgba(255, 255, 255, 0) 0%,
              rgba(255, 255, 255, 0.5) 50%,
              rgba(255, 255, 255, 0.7) 70%,
              rgba(255, 255, 255, 0.9) 90%
            );
            --lrndesign-gallery-carousel-prev-bg: linear-gradient(
              to right,
              rgba(255, 255, 255, 0.9) 10%,
              rgba(255, 255, 255, 0.7) 30%,
              rgba(255, 255, 255, 0.5) 50%,
              rgba(255, 255, 255, 0) 100%
            );
            --lrndesign-gallery-thumbnail-image: {
              display: block;
              border-radius: 3px;
              border: 2px solid transparent;
            }
            --lrndesign-gallery-thumbnail-image-focus: {
              opacity: 0.7;
              border: 2px solid var(--lrndesign-gallery-focus-color);
            }
            --lrndesign-gallery-thumbnail-image-selected: {
              opacity: 0.5;
              cursor: default;
            }
          }
          :host([dark]) {
            --lrndesign-gallery-background-color: var(
              --simple-colors-default-theme-grey-2
            );
            --lrndesign-gallery-border-color: var(
              --simple-colors-default-theme-grey-1
            );
            --lrndesign-gallery-carousel-next-bg: linear-gradient(
              to right,
              rgba(0, 0, 0, 0) 0%,
              rgba(0, 0, 0, 0.5) 50%,
              rgba(0, 0, 0, 0.7) 70%,
              rgba(0, 0, 0, 0.9) 90%
            );
            --lrndesign-gallery-carousel-prev-bg: linear-gradient(
              to right,
              rgba(0, 0, 0, 0.9) 10%,
              rgba(0, 0, 0, 0.7) 30%,
              rgba(0, 0, 0, 0.5) 50%,
              rgba(0, 0, 0, 0) 100%
            );
          }
          :host([hidden]) {
            display: none;
          }
          .sr-only {
            position: absolute;
            left: -999999;
            height: 0;
            width: 0;
            overflow: hidden;
          }
          .gallerythumb {
            min-width: unset;
            max-width: 100%;
            padding: 0;
            margin: 0;
            display: inline-block;
            transform: none !important;
            position: static !important;
            cursor: pointer;
          }
          lrndesign-gallery-zoom {
            z-index: 2;
          }
          simple-tooltip {
            z-index: 2;
          }
          .zoombg {
            background-color: var(--lrndesign-gallery-dialog-background-color);
            opacity: 0.25;
          }
          .zoombg,
          .zoomicon {
            position: absolute;
            width: 24px;
            height: 24px;
            transition: opacity 0.5s ease-in-out;
          }
          lrndesign-gallery-zoom:focus-within .zoombg,
          lrndesign-gallery-zoom:hover .zoombg {
            opacity: 0;
            transition: opacity 0.5s ease-in-out;
          }
          .zoomicon {
            opacity: 0.75;
            color: var(--lrndesign-gallery-color);
            background-color: transparent;
          }
          lrndesign-gallery-zoom:focus-within .zoomicon,
          lrndesign-gallery-zoom:hover .zoomicon {
            opacity: 1;
            transition: opacity 0.5s ease-in-out;
          }
          @media print {
            #galleryscreen {
              display: none !important;
            }
          }
        `]}static get properties(){return{...super.properties,anchorData:{type:Object},aspectRatio:{type:Number},extraWide:{type:Boolean,reflect:!0,attribute:"extra-wide"},galleryId:{type:String},galleryTitle:{type:String,reflect:!0,attribute:"gallery-title"},grid:{type:Boolean},layout:{type:String,attribute:"layout"},responsiveSize:{type:String,reflect:!0,attribute:"responsive-size"},selected:{type:Object},sources:{type:Array},sizing:{type:String},title:{type:String}}}constructor(){super(),this.aspectRatio=1.33333333,this.extraWide=!1,this.grid=!1,this.responsiveSize="xs",this.selected={},this.sizing="cover",this.sources=[]}updated(e){e.forEach((e,r)=>{"galleryTitle"!=r&&"title"!=r||this.galleryTitle||(this.galleryTitle=this.title)})}_generateUUID(){return"ss-s-s-s-sss".replace(/s/g,Math.floor(65536*(1+Math.random())).toString(16).substring(1))}_getParentOffset(e){let r=e.parentNode;return null!=r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(r=r.host),r.offsetTop}_itemChanged(e){this.dispatchEvent(new CustomEvent("item-changed",{bubbles:!0,cancelable:!0,composed:!0,detail:e}))}_scrollIntoView(e=[0]){window.scrollTo({top:e.reduce((e,r)=>e+r),behavior:"smooth"})}}window.customElements.define(LrndesignGalleryBehaviors.tag,LrndesignGalleryBehaviors);export{LrndesignGalleryBehaviors};