import { Component, h } from "@stencil/core";
import { waitForAtomic } from "../../utils/atomic";
import template1 from "./template-1.html";
import SitePagesTemplate from "./SitePagesTemplate.html";
import KATemplate from "./KATemplate.html";
import FAQTemplate from "./FAQTemplate.html";
import QuickLinksTemplate from "./QuickLinksTemplate.html";
import AppTemplate from "./AppTemplate.html";
import ELearningTemplate from "./ELearningTemplate.html";
import PeopleTemplate from "./PeopleTemplate.html";
import DocumentsTemplate from "./DocumentsTemplate.html";
import MediaTemplate from "./MediaTemplate.html";
import PeopleSnowTemplate from './PeopleSnowTemplate.html';
/**
 * Component used to manage results & result templates.
 * See https://docs.coveo.com/en/atomic/latest/usage/create-a-result-list/
 */
@Component({
  tag: "results-manager",
  shadow: false,
})
export class ResultsManager {
  public async componentWillLoad() {
    return waitForAtomic();
  }

  public render() {


    return (
        
      <atomic-result-list>
        <atomic-result-template must-match-filetype='mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,gif,jpeg,jpg,png,bmp,Image,mp3,mp4,wmv,avi,MOV,flv,mkv,webm,ogg,ogv,m4v,mpg'>
          <template innerHTML={MediaTemplate}></template>
        </atomic-result-template>
        <atomic-result-template must-match-abicontenttype="Site Pages">
        <template innerHTML={SitePagesTemplate}></template>
      </atomic-result-template>
        <atomic-result-template must-match-abicontenttype="Knowledge Article">
          <template innerHTML={KATemplate}></template>
        </atomic-result-template>
      <atomic-result-template must-match-abicontenttype='FAQ'>
        <template innerHTML={FAQTemplate}></template>
      </atomic-result-template>
      <atomic-result-template must-match-abicontenttype='Quick Links'>
        <template innerHTML={QuickLinksTemplate}></template>
      </atomic-result-template>
      <atomic-result-template must-match-abicontenttype='Application'>
        <template innerHTML={AppTemplate}></template>
      </atomic-result-template>
      <atomic-result-template must-match-abicontenttype='eLearning'>
        <template innerHTML={ELearningTemplate}></template>
      </atomic-result-template>
      <atomic-result-template must-match-abicontenttype='People' must-match-objecttype='Account'>
        <template innerHTML={PeopleTemplate}></template>
      </atomic-result-template>
      <atomic-result-template must-match-abicontenttype='People' must-match-filetype='sys_user'>
        <template innerHTML={PeopleSnowTemplate}></template>
      </atomic-result-template>
      <atomic-result-template must-match-abicontenttype='Documents'>
        <template innerHTML={DocumentsTemplate}></template>
      </atomic-result-template>
      <atomic-result-template must-match-abicontenttype='Media'>
        <template innerHTML={MediaTemplate}></template>
        </atomic-result-template>
        <atomic-result-template>
          <template innerHTML={template1}></template>
        </atomic-result-template>
      </atomic-result-list>
    );
  }
}
