buildInline_() {
    const closeButtonEl = htmlFor(this.element)`
          <button class="i-amphtml-story-page-attachment-close-button" aria-label="close"
              role="button">
          </button>`;
    const localizationService = getLocalizationService(devAssert(this.element));

    const titleEl = htmlFor(this.element)`
    <span class="i-amphtml-story-page-attachment-title"></span>`;

    if (localizationService) {
      const localizedCloseString = localizationService.getLocalizedString(
        LocalizedStringId.AMP_STORY_CLOSE_BUTTON_LABEL
      );
      closeButtonEl.setAttribute('aria-label', localizedCloseString);
    }

    if (this.element.hasAttribute('data-title')) {
      titleEl.textContent = this.element.getAttribute('data-title');
    }

    const titleAndCloseWrapperEl = this.headerEl.appendChild(
      htmlFor(this.element)`
            <div class="i-amphtml-story-draggable-drawer-header-title-and-close"></div>`
    );
    titleAndCloseWrapperEl.appendChild(closeButtonEl);
    titleAndCloseWrapperEl.appendChild(titleEl);

    const templateEl = this.element.querySelector(
      '.i-amphtml-story-draggable-drawer'
    );

    while (this.element.firstChild && this.element.firstChild !== templateEl) {
      this.contentEl.appendChild(this.element.firstChild);
    }

    // Ensures the content of the attachment won't be rendered/loaded until we
    // actually need it.
    toggle(dev().assertElement(this.containerEl), true);
  }
/**
   * Builds inline page attachment's drawer UI.
   * @private
   */
Builds inline page attachment's drawer UI.
@private
Builds inline page attachment ' s drawer UI . @private
buildInline_() {
    const closeButtonEl = htmlFor(this.element)`
          <button class="i-amphtml-story-page-attachment-close-button" aria-label="close"
              role="button">
          </button>`;
    const localizationService = getLocalizationService(devAssert(this.element));
    const titleEl = htmlFor(this.element)`
    <span class="i-amphtml-story-page-attachment-title"></span>`;
    if (localizationService) {
      const localizedCloseString = localizationService.getLocalizedString(
        LocalizedStringId.AMP_STORY_CLOSE_BUTTON_LABEL
      );
      closeButtonEl.setAttribute('aria-label', localizedCloseString);
    }
    if (this.element.hasAttribute('data-title')) {
      titleEl.textContent = this.element.getAttribute('data-title');
    }
    const titleAndCloseWrapperEl = this.headerEl.appendChild(
      htmlFor(this.element)`
            <div class="i-amphtml-story-draggable-drawer-header-title-and-close"></div>`
    );
    titleAndCloseWrapperEl.appendChild(closeButtonEl);
    titleAndCloseWrapperEl.appendChild(titleEl);
    const templateEl = this.element.querySelector(
      '.i-amphtml-story-draggable-drawer'
    );
    while (this.element.firstChild && this.element.firstChild !== templateEl) {
      this.contentEl.appendChild(this.element.firstChild);
    }
    toggle(dev().assertElement(this.containerEl), true);
  }
buildInline_ ( ) { const closeButtonEl = htmlFor ( this . element ) ` ` ; const localizationService = getLocalizationService ( devAssert ( this . element ) ) ; const titleEl = htmlFor ( this . element ) ` ` ; if ( localizationService ) { const localizedCloseString = localizationService . getLocalizedString ( LocalizedStringId . AMP_STORY_CLOSE_BUTTON_LABEL ) ; closeButtonEl . setAttribute ( 'aria-label' , localizedCloseString ) ; } if ( this . element . hasAttribute ( 'data-title' ) ) { titleEl . textContent = this . element . getAttribute ( 'data-title' ) ; } const titleAndCloseWrapperEl = this . headerEl . appendChild ( htmlFor ( this . element ) ` ` ) ; titleAndCloseWrapperEl . appendChild ( closeButtonEl ) ; titleAndCloseWrapperEl . appendChild ( titleEl ) ; const templateEl = this . element . querySelector ( '.i-amphtml-story-draggable-drawer' ) ; while ( this . element . firstChild && this . element . firstChild !== templateEl ) { this . contentEl . appendChild ( this . element . firstChild ) ; } toggle ( dev ( ) . assertElement ( this . containerEl ) , true ) ; }
Builds inline page attachment's drawer UI.
Builds inline page attachment ' s drawer UI .
// Ensures the content of the attachment won't be rendered/loaded until we // actually need it.