(function (factory) {
  typeof define === 'function' && define.amd ? define(factory) :
  factory();
})((function () { 'use strict';

  const{merge:merge}=window._;const echartSetOption=(t,e,s,n)=>{const{breakpoints:o,resize:a}=window.phoenix.utils,l=e=>{Object.keys(e).forEach((s=>{window.innerWidth>o[s]&&t.setOption(e[s]);}));},r=document.body;t.setOption(merge(s(),e));const i=document.querySelector(".navbar-vertical-toggle");i&&i.addEventListener("navbar.vertical.toggle",(()=>{t.resize(),n&&l(n);})),a((()=>{t.resize(),n&&l(n);})),n&&l(n),r.addEventListener("clickControl",(({detail:{control:o}})=>{"phoenixTheme"===o&&t.setOption(window._.merge(s(),e)),n&&l(n);}));};const echartTabs=document.querySelectorAll("[data-tab-has-echarts]");echartTabs&&echartTabs.forEach((t=>{t.addEventListener("shown.bs.tab",(t=>{const e=t.target,{hash:s}=e,n=s||e.dataset.bsTarget,o=document.getElementById(n.substring(1))?.querySelector("[data-echart-tab]");o&&window.echarts.init(o).resize();}));}));

  const reportsDetailsChartInit=()=>{const{getColor:t,getData:o,toggleColor:e}=window.phoenix.utils,i=document.querySelector(".echart-reports-details"),r=(t,o="MMM DD")=>{let e="";return t.forEach((t=>{e+=`<div class='ms-1'>\n          <h6 class="text-body-tertiary"><span class="fas fa-circle me-1 fs-10" style="color:${t.color}"></span>\n            ${t.seriesName} : ${"object"==typeof t.value?t.value[1]:t.value}\n          </h6>\n        </div>`;})),`<div>\n              <p class='mb-2 text-body-tertiary'>\n                ${window.dayjs(t[0].axisValue).isValid()?window.dayjs(t[0].axisValue).format("DD MMM, YYYY"):t[0].axisValue}\n              </p>\n              ${e}\n            </div>`},a=[64,40,45,62,82];if(i){const l=o(i,"echarts"),n=window.echarts.init(i);echartSetOption(n,l,(()=>({color:[t("primary-lighter"),t("info-light")],tooltip:{trigger:"axis",padding:[7,10],backgroundColor:t("body-highlight-bg"),borderColor:t("border-color"),textStyle:{color:t("light-text-emphasis")},borderWidth:1,transitionDuration:0,axisPointer:{type:"none"},formatter:r,extraCssText:"z-index: 1000"},xAxis:{type:"category",data:["Analysis","Statement","Action","Offering","Interlocution"],axisLabel:{color:t("body-color"),fontFamily:"Nunito Sans",fontWeight:600,fontSize:12.8,rotate:30,formatter:t=>`${t.slice(0,5)}...`},axisLine:{lineStyle:{color:t("secondary-bg")}},axisTick:!1},yAxis:{type:"value",splitLine:{lineStyle:{color:t("secondary-bg")}},axisLabel:{color:t("body-color"),fontFamily:"Nunito Sans",fontWeight:700,fontSize:12.8,margin:24,formatter:t=>`${t}%`}},series:[{name:"Revenue",type:"bar",barWidth:"32px",barGap:"48%",showBackground:!0,backgroundStyle:{color:e(t("primary-bg-subtle"),t("body-highlight-bg"))},label:{show:!1},itemStyle:{color:e(t("primary-light"),t("primary"))},data:a}],grid:{right:"0",left:"0",bottom:0,top:10,containLabel:!0},animation:!1})));}};

  const{docReady:docReady}=window.phoenix.utils;docReady(reportsDetailsChartInit);

}));
//# sourceMappingURL=report-details.js.map
