/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import { c as o } from "../../chunks/runtime.js";
import { css as r, html as s } from "lit";
import { u as d } from "../../chunks/useT9n.js";
import { LitElement as c, createEvent as l } from "@arcgis/lumina";
import { createRef as h, ref as g } from "lit/directives/ref.js";
import "../solutions-resources-section/customElement.js";
const p = { heading: "Get Started", card1: { heading: "What's new in the app" }, card2: { heading: "Deploy a solution" }, card3: { heading: "Manage a deployment" }, card4: { heading: "AI Assistant" } }, u = { heading: "Documentation", card1: { heading: "Help" }, card2: { heading: "What's new" }, card3: { heading: "FAQ" }, card4: { heading: "ArcGIS Blog" } }, m = { heading: "Support", card1: { heading: "Esri Community" }, card2: { heading: "ArcGIS Ideas" }, card3: { heading: "Esri Video" }, card4: { heading: "Technical support" } }, n = {
  getStarted: p,
  documentation: u,
  support: m
}, b = r`*[tabindex]:focus-visible{outline:2px solid var(--calcite-color-brand);outline-offset:2px}.position-relative{position:relative}.background-override{--calcite-shell-panel-background-color: var(--calcite-color-foreground-2);--calcite-panel-background-color: var(--calcite-color-foreground-2)}.width-350{--calcite-shell-panel-width: 350px}.height-full{height:100%}.padding-end-1-2{padding-inline-end:var(--calcite-spacing-sm)}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-shell{background-color:unset}.padding-end-1{padding-inline-end:var(--calcite-spacing-lg)}.padding-start-1{padding-inline-start:var(--calcite-spacing-lg)}.margin-end-md{margin-inline-end:var(--calcite-spacing-md)}.resources-container{width:100%;box-sizing:border-box}.hero-banner{background-color:var(--calcite-color-foreground-2);padding:4.25rem var(--calcite-spacing-md);text-align:center;width:100%;box-sizing:border-box;margin-bottom:3rem}.hero-heading{font-size:var(--calcite-font-size-5);font-weight:var(--calcite-font-weight-medium);margin:0 0 var(--calcite-spacing-xxl) 0;color:var(--calcite-color-text-1)}.hero-subheading{font-size:var(--calcite-font-size-0);color:var(--calcite-color-text-2);max-width:600px;margin:0 auto}`;
class f extends c {
  constructor() {
    super(), this._translations = d({ name: "solutions-resources-shell", blocking: !0 }), this._mainPanelRef = h(), this._panelFixed = !1, this.sortTypeChanged = l(), this.listenOn(window, "deployAppTabSelected", this._handleDeployAppTabSelected);
  }
  static {
    this.properties = { _translations: 16 };
  }
  static {
    this.styles = b;
  }
  updated() {
    this._fixPanelContentWrapperFocus();
  }
  _fixPanelContentWrapperFocus() {
    if (!this._panelFixed && this._mainPanelRef.value) {
      const e = this._mainPanelRef.value;
      e.componentOnReady?.().then(() => {
        if (e.shadowRoot) {
          const i = e.shadowRoot.querySelector(".content-wrapper");
          i && (i.tabIndex = -1, this._panelFixed = !0, this._setupPanelObserver());
        }
      }).catch(() => {
        this._panelFixed = !0;
      });
    }
  }
  _setupPanelObserver() {
    if (this._panelObserver)
      return;
    this._panelObserver = new MutationObserver((i) => {
      i.forEach((t) => {
        if (t.type === "attributes" && t.attributeName === "tabindex") {
          const a = t.target;
          a.classList.contains("content-wrapper") && a.tabIndex === 0 && (a.tabIndex = -1);
        }
      });
    });
    const e = this._mainPanelRef.value;
    if (e?.shadowRoot) {
      const i = e.shadowRoot.querySelector(".content-wrapper");
      i && this._panelObserver.observe(i, { attributes: !0, attributeFilter: ["tabindex"] });
    }
  }
  disconnectedCallback() {
    super.disconnectedCallback(), this._panelObserver?.disconnect();
  }
  render() {
    const e = this._translations;
    return s`<calcite-shell><calcite-panel ${g(this._mainPanelRef)}><div class="resources-container"><div class="hero-banner"><h1 class="hero-heading" tabindex=0>${e.hero.heading}</h1><p class="hero-subheading" tabindex=0>${e.hero.subheading}</p></div><solutions-resources-section .heading=${e.getStarted.heading} .subheading=${e.getStarted.subheading} .cards=${[
      {
        meridianIcon: "value",
        heading: e.getStarted.card1.heading,
        description: e.getStarted.card1.description,
        url: "https://links.esri.com/solutions/whats-new-in-the-app",
        headingEn: n.getStarted.card1.heading,
        sectionHeadingEn: n.getStarted.heading
      },
      {
        meridianIcon: "install",
        heading: e.getStarted.card2.heading,
        description: e.getStarted.card2.description,
        url: "https://links.esri.com/solutions/deploy-a-solution",
        headingEn: n.getStarted.card2.heading,
        sectionHeadingEn: n.getStarted.heading
      },
      {
        meridianIcon: "keys",
        heading: e.getStarted.card3.heading,
        description: e.getStarted.card3.description,
        url: "https://links.esri.com/solutions/manage-a-deployment",
        headingEn: n.getStarted.card3.heading,
        sectionHeadingEn: n.getStarted.heading
      },
      {
        meridianIcon: "speech-bubbles",
        heading: e.getStarted.card4.heading,
        description: e.getStarted.card4.description,
        url: "https://links.esri.com/solutions/ai-assistant",
        headingEn: n.getStarted.card4.heading,
        sectionHeadingEn: n.getStarted.heading
      }
    ]}></solutions-resources-section><solutions-resources-section .heading=${e.documentation.heading} .subheading=${e.documentation.subheading} .cards=${[
      {
        meridianIcon: "search-files",
        heading: e.documentation.card1.heading,
        description: e.documentation.card1.description,
        url: "https://links.esri.com/solutions/help",
        headingEn: n.documentation.card1.heading,
        sectionHeadingEn: n.documentation.heading
      },
      {
        meridianIcon: "value",
        heading: e.documentation.card2.heading,
        description: e.documentation.card2.description,
        url: "https://links.esri.com/solutions/whats-new",
        headingEn: n.documentation.card2.heading,
        sectionHeadingEn: n.documentation.heading
      },
      {
        meridianIcon: "faq",
        heading: e.documentation.card3.heading,
        description: e.documentation.card3.description,
        url: "https://links.esri.com/solutions/faq",
        headingEn: n.documentation.card3.heading,
        sectionHeadingEn: n.documentation.heading
      },
      {
        meridianIcon: "arcmap-blog",
        heading: e.documentation.card4.heading,
        description: e.documentation.card4.description,
        url: "https://links.esri.com/solutions/arcgis-blogs",
        headingEn: n.documentation.card4.heading,
        sectionHeadingEn: n.documentation.heading
      }
    ]}></solutions-resources-section><solutions-resources-section .heading=${e.support.heading} .subheading=${e.support.subheading} .cards=${[
      {
        meridianIcon: "esri-community",
        heading: e.support.card1.heading,
        description: e.support.card1.description,
        url: "https://links.esri.com/solutions/esri-community",
        headingEn: n.support.card1.heading,
        sectionHeadingEn: n.support.heading
      },
      {
        meridianIcon: "idea",
        heading: e.support.card2.heading,
        description: e.support.card2.description,
        url: "https://links.esri.com/solutions/arcgis-ideas",
        headingEn: n.support.card2.heading,
        sectionHeadingEn: n.support.heading
      },
      {
        meridianIcon: "video",
        heading: e.support.card3.heading,
        description: e.support.card3.description,
        url: "https://links.esri.com/solutions/esri-video",
        headingEn: n.support.card3.heading,
        sectionHeadingEn: n.support.heading
      },
      {
        meridianIcon: "support",
        heading: e.support.card4.heading,
        description: e.support.card4.description,
        url: "https://links.esri.com/solutions/technical-support",
        headingEn: n.support.card4.heading,
        sectionHeadingEn: n.support.heading
      }
    ]}></solutions-resources-section></div></calcite-panel></calcite-shell>`;
  }
  _handleDeployAppTabSelected(e) {
    e.detail === "resources" && this.sortTypeChanged.emit("");
  }
}
o("solutions-resources-shell", f);
export {
  f as SolutionsResourcesShell
};
