text: define(["exports","../../../../@polymer/polymer/polymer-element.js","../../../../@polymer/polymer/lib/legacy/polymer.dom.js","../../../../@polymer/paper-icon-button/paper-icon-button.js","../../../../@polymer/polymer/lib/elements/dom-repeat.js","../../../../@polymer/paper-dialog/paper-dialog.js","../../../../@polymer/paper-dialog-scrollable/paper-dialog-scrollable.js","../../../../@polymer/paper-input/paper-input.js","../../../../@polymer/paper-button/paper-button.js","./lrnapp-studio-submission-edit-add-asset.js"],(function(i,e,t,l,s,n,p,a,o,d){"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.LrnappStudioSubmissionEditLinks=void 0;class LrnappStudioSubmissionEditLinks extends e.PolymerElement{static get template(){return e.html`
        <style>
          :host {
            display: block;
          }
  
          .item {
            display: flex;
            margin: auto;
          }
  
          .info {
            flex: 1 1 auto;
          }
  
          .create {
            display: flex;
            align-items: center;
          }
  
          .input {
            flex: 1 1 auto;
          }
  
          paper-dialog {
            width: 50%;
            width: 50vmax;
            padding: 1em;
          }
        </style>
  
        <template is="dom-repeat" items="{{links}}" as="link">
          <div class="item">
            <div class="info">
              <div class="linksfield__url">{{link.url}}</div>
            </div>
            <div class="linksfield__actions">
              <paper-icon-button
                icon="delete"
                class="linksfield__delete"
                data-index\$="{{index}}"
                on-click="_deleteLink"
              ></paper-icon-button>
            </div>
          </div>
        </template>
        <lrnapp-studio-submission-edit-add-asset
          icon="link"
          display="pill"
          on-click="_openDialog"
        ></lrnapp-studio-submission-edit-add-asset>
  
        <paper-dialog id="dialog">
          <h2>Add Link</h2>
          <paper-dialog-scrollable>
            <paper-input
              id="link-input"
              class="input"
              label="URL"
              value="{{newlink}}"
            ></paper-input>
          </paper-dialog-scrollable>
          <div class="buttons">
            <paper-button dialog-dismiss="">Cancel</paper-button>
            <paper-button dialog-confirm="" on-click="_createLink"
              >Add Link</paper-button
            >
          </div>
        </paper-dialog>
      `}static get tag(){return"lrnapp-studio-submission-edit-links"}static get properties(){return{links:{type:Array,value:null,notify:!0},newlink:{type:String,value:""}}}_openDialog(){this.$.dialog.open()}_createLink(i){null===this.links&&this.set("links",[]),this.push("links",{url:this.newlink}),this.newlink=""}_deleteLink(i){var e=(0,t.dom)(i).localTarget.getAttribute("data-index");this.splice("links",e,1)}}i.LrnappStudioSubmissionEditLinks=LrnappStudioSubmissionEditLinks,window.customElements.define(LrnappStudioSubmissionEditLinks.tag,LrnappStudioSubmissionEditLinks)}));