/* COPYRIGHT Esri - https://js.arcgis.com/1.2/LICENSE.txt */
import c from"./MITVRON5.js";import b from"./U2FD6RFU.js";import a from"./YFLYHPA6.js";import{b as g}from"./W4YXXJAS.js";import{b as f}from"./77CU4WA2.js";import"./TRGFYBOH.js";import{a as u}from"./6S75SIVV.js";import"./5IZMQFRP.js";import"./FOQPGXXA.js";import"./ED6SUP22.js";import"./E6P6PYNW.js";import"./IKKBLHLZ.js";import"./CUA2IUXX.js";import"./4UZDZNJD.js";import"./KOTG6W5Z.js";import"./6SC7YR5Y.js";import"./Z6NOHRUL.js";import"./GVM4XYEI.js";import"./NGDVSE4Z.js";import"./BTNJZZQQ.js";import"./ZYQ4P2ON.js";import"./5MKH4QDV.js";import"./3GWWHA4S.js";import"./3YYHZQJB.js";import"./JEJ23R3P.js";import"./TONS7KZJ.js";import"./Q62UEPOL.js";import"./44A5XEM4.js";import{b as m}from"./ABSRNM72.js";import{H as h,J as p,L as o,h as n,i as t,r as d}from"./5CQPQ7AE.js";import"./3QPJ2JCA.js";export default $arcgis.t(([{n:x},,{f:b}])=>{var S=n`/** @license
 * Copyright 2025 Esri
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

calcite-card {
  height: 100%;
  padding-bottom: 2px;
}

/* @media (max-width: 600px) {
  calcite-card {
    width: calc(100% / 2 - .5rem);
  }
} */

@media (max-width: 400px) {
  calcite-card {
    width: 100%;
  }
}

calcite-card:hover img {
  /* TODO check in dark mode */
  -webkit-filter: brightness(30%);
  filter: brightness(30%);
  -webkit-transition: all .1s ease;
  -moz-transition: all .1s ease;
  -o-transition: all .1s ease;
  -ms-transition: all .1s ease;
  transition: all .1s ease;
}

calcite-card:hover .hover-text {
  opacity: 1;
  color: #ffffff;
}

calcite-card:hover {
  outline: 2px solid var(--calcite-color-brand);
  box-sizing: border-box;
  cursor: pointer;
}

.chip-status {
  --calcite-chip-icon-color: var(--calcite-color-brand);
  cursor: pointer;
}

.chip-deployed {
  --calcite-chip-icon-color: var(--calcite-color-status-success);
}

.hover-text {
  transition: .1s ease;
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 100%;
  font-size: 1.2rem;
}

.font-color-text-2 {
  --calcite-label-text-color: var(--calcite-color-text-2);
}

.font-line-height {
  line-height: 1.4;
}

.font-size-size--1 {
  font-size: var(--calcite-font-size--1);
}

.header-line-height {
  --calcite-label-margin-bottom: 0;
  margin-top: 0.5rem;
  margin-bottom: 0.7rem;
}

.info-icon {
  /* TODO check in dark mode...likely just want to set this to #FFFFFF */
  --calcite-icon-color: var(--calcite-color-text-inverse);
  padding-inline-end: .3rem;
}

.card-image-wrap {
  flex: 0 0 auto;
}

.card-image-wrap {
  width: 100%;
  position: relative;
  margin-bottom: 0;
  -webkit-box-flex: 0 0 auto;
  -ms-flex: 0 0 auto;
  flex: 0 0 auto;
}

.card-image {
  width: 100%;
  display: block;
}

video,
img {
  max-width: 100%;
  height: auto;
}

img {
  overflow-clip-margin: content-box;
  overflow: clip;
}

a {
  text-decoration: none;
  color: inherit;
  outline: 0;
  padding: 0;
  margin: 0;
  display: inherit;
  height: 100%;
}`,l=class extends h{constructor(){super(...arguments),this.referrerSolutionId="",this.referrerSolutionTitle="",this.referrerSolutionVersion="",this.source="all-solutions",this._translations=u({name:"solution-details-card",blocking:!0}),this._configContextConsumer=f({context:g,subscribe:!0}),this.detailsCardSelected=d()}static{this.properties={card:[0,{},{attribute:!1}],referrerSolutionId:1,referrerSolutionTitle:1,referrerSolutionVersion:1,source:1,_translations:[16,{},{state:!0}]}}static{this.styles=S}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}render(){let e=b(this.card.title);return t`<a href=${e??o} @click=${this._anchorClick} .title=${`${this._translations.arcgisSolutions} | ${this.card.title}`}>${this._renderCard()}</a>`}_anchorClick(e){e.preventDefault()}_cardSelected(){if(this.source==="you-may-also-like"){let r=[this.referrerSolutionTitle,this.referrerSolutionId,this.referrerSolutionVersion,this.card?.title||"",this.card?.deployCommonId||"",this.card?.deployVersion||""];this._telemetry?.logEvent({category:x.SOLUTION_DETAILS,action:"Related Solution",dimensions:r})}this.detailsCardSelected.emit(this.card)}_renderChips(e){let r=e.includes("deployed"),v=e.filter(i=>i!=="deployed"),s=[];return v.forEach(i=>{let y="chip-status",c=`solution-details-card-chip-${i}`,w=i==="new"?"star":"mega-phone",a=i==="new"?this._translations.newSolution:this._translations.updated;s.push(t`<calcite-chip class=${p(y)} .icon=${w} id=${c??o} .label=${a} .value=${a} scale=s></calcite-chip><calcite-tooltip .referenceElement=${c}><span>${a}</span></calcite-tooltip>`)}),r&&s.push(t`<calcite-chip class="chip-deployed" icon=check-circle id=solution-details-card-chip-deployed .label=${this._translations.deployed} .value=${this._translations.deployed} scale=s></calcite-chip><calcite-tooltip reference-element=solution-details-card-chip-deployed><span>${this._translations.deployed}</span></calcite-tooltip>`),s}_renderCard(){let e=this.card;return t`<calcite-card .label=${e.snippet} @click=${this._cardSelected}><div class="card-image-wrap" slot=thumbnail><img alt=${e.title??o} class="thumbnail card-image" src=${e.thumbnailUrl??o}><div class="hover-text">${this._translations.viewDetails}</div></div><calcite-label slot=heading class="header-line-height" scale=l>${e.title}</calcite-label><p slot=description class="font-color-text-2 font-line-height font-size-size--1">${e.snippet}</p>${e.chips&&e.chips.length>0?t`<div slot=footer-end style="display: flex; gap: 0.5rem; justify-content: flex-end;">${this._renderChips(e.chips)}</div>`:void 0}<div slot=footer-start></div></calcite-card>`}};m("solution-details-card",l);return l},a,b,c)