class t extends HTMLElement{connectedCallback(){this.textContent="Hello World!!"}}class e extends HTMLElement{connectedCallback(){this.innerHTML="<button>Hover me</button>",window.tippy(this.querySelector("button"),{content:"Feh, World!"})}}class i extends HTMLElement{tippyInstance=null;connectedCallback(){let t=this.getAttribute("name")||"Unknown",e=this.getAttribute("reference-code")||"N/A",i=this.getAttribute("disability-info")||"None",n=this.getAttribute("photo")||"",s=`
            <div style="display: flex; align-items: center; gap: 10px; padding: 10px; font-family: Arial, sans-serif;">
                <img src="${n}" alt="Profile Photo" style="width: 50px; height: 50px; border-radius: 50%; object-fit: cover;" />
                <div>
                    <div><strong>Name:</strong> ${t}</div>
                    <div><strong>Reference Code:</strong> ${e}</div>
                    <div><strong>Disability Info:</strong> ${i}</div>
                </div>
            </div>
        `,l=document.createElement("a");l.textContent="Hover for details yez",this.appendChild(l),this.tippyInstance=window.tippy(l,{content:s,allowHTML:!0,interactive:!0,theme:"light",placement:"top",zIndex:9999,popperOptions:{strategy:"fixed"}})}disconnectedCallback(){this.tippyInstance&&this.tippyInstance.destroy()}}var n,s=((n=s||{}).AT_RISK="AT_RISK",n.STUDY_SUPPORT="STUDY_SUPPORT",n.MEDICAL_CONDITION="MEDICAL_CONDITION",n.TEACHING_IMPLICATIONS="TEACHING_IMPLICATIONS",n.ABS_FLAG="ABS_FLAG",n.CONTRACT_STAGE="CONTRACT_STAGE",n);const l={AT_RISK:{icon:"P/exclamation-red-frame.png",title:"At Risk"},STUDY_SUPPORT:{icon:"P/information-shield.png",title:"Receives Study Support"},MEDICAL_CONDITION:{icon:"P/plus-shield.png",title:"Identified Medical Condition"},TEACHING_IMPLICATIONS:{icon:"P/shield--pencil.png",title:"Implications for Teaching"},ABS_FLAG:{icon:"F/flag_red.png",title:"Active Absence Flag"},CONTRACT_STAGE:{icon:"",ttitle:"Active Contract"}};class o extends HTMLElement{tippyInstance=null;connectedCallback(){let t=this.getAttribute("name")||"Unknown",e=this.getAttribute("reference")||"N/A",i=this.getAttribute("pronouns")||"",n=this.getAttribute("photo-url")||"",s=this.getAttribute("profile-url")||"",l=this.hasAttribute("show-name")&&"false"!==this.getAttribute("show-name"),o=`
            <div class="mini-profile align-items-center">
                <img src="${n}" alt="Profile Photo" class="img-fluid photo"/>
                <div>
                    <p class="name">${t}</p>
                    <p class="reference">${e}</p>
                    <p class="pronouns">${i}</p>
                    ${this.getCalloutHtml()}
                </div>
            </div>
        `,a=document.createElement("a");a.textContent=l?t:e,a.href=s,a.target="_blank",this.appendChild(a),this.tippyInstance=window.tippy(a,{content:o,allowHTML:!0,interactive:!0,theme:"light",placement:"top",zIndex:9999,delay:[200,150],popperOptions:{strategy:"fixed"}})}getCalloutHtml(){let t=this.getAttribute("callout-csv")?.split(",")||[],e=this.getAttribute("contract-stage")||"";if(0===t.length)return"";let i='<div class="callout-wrapper">';for(let n of t)if(n in l){let{icon:t,title:s}=l[n];if("CONTRACT_STAGE"===n&&e){i+=`
                        <div>
                            <span class="flag-label">${e} Active Contract</span>
                        </div>
                    `;continue}i+=`
                    <div>
                        <img class="ops_iconTag icon" src="/Static/Icons/${t}" alt="${s}" title="${s}"/>
                        <span>${s}</span>
                    </div>
                `}return i+"</div>"}disconnectedCallback(){this.tippyInstance&&(this.tippyInstance.destroy(),this.tippyInstance=null),this.querySelector("a")?.remove()}}customElements.define("hello-world",t),customElements.define("custom-tooltip",e),customElements.define("rich-tooltip",i),customElements.define("mini-profile",o);
//# sourceMappingURL=bundle.js.map
