'use strict';
import { apiGetWithOData } from '../../../../fd-toolbox/api/api-client.js';
import { resourceNames } from '../../../../fd-toolbox/resources/resource-names.js';
import { dashboard1Id } from '../../../../fd-toolbox/constants/internal-dashboard-ids.js';
import { oDataOperators } from '../../../../fd-toolbox/enums/enums.js';
import { dashboardReportProps } from '../../../common/demo/props/dashboard-props.js';
import { oDataComparisonTypes, oDataFilterTypes } from '../../../../fd-toolbox/odata/odata-enums.js';
import { reportProps } from '../../../common/demo/props/report-props.js';
import { first } from '../../../../fd-toolbox/server/collections/single-funcs.js';

var __defProp=Object['defineProperty'],__name=(_0x5685f1,_0x2f95f2)=>__defProp(_0x5685f1,'name',{'value':_0x2f95f2,'configurable':!![]});const dashboardLayoutConfig={'defaultWidth':0x14,'defaultHeight':0x5,'minWidth':0x2,'minHeight':0x1,'breakpointWidth':0x2bc};async function setDashboardReports(_0x4ef476){const _0x1b15fb={'filters':[{'leftSide':dashboardReportProps['dashboardId'],'rightSide':dashboard1Id,'operator':oDataOperators['equal'],'type':oDataFilterTypes['string'],'comparisonType':oDataComparisonTypes['equal']}],'expands':[dashboardReportProps['report']+'/'+reportProps['reportChartSeriesList']]},_0x12b754=await apiGetWithOData(resourceNames['dashboardReport'],_0x1b15fb);_0x12b754?.['data']&&Array['isArray'](_0x12b754['data'])&&_0x4ef476(_0x12b754['data']);}__name(setDashboardReports,'setDashboardReports');function observerDashboard(_0x462c51,_0x413d8d){if(!_0x413d8d)return void(0x1d82*0x1+0x128c+-0x300e);const _0x242a2f=new ResizeObserver(_0x2eadd5=>{const _0x263b64=first(_0x2eadd5)['contentRect']['width'];_0x462c51(_0x263b64);});return _0x242a2f['observe'](_0x413d8d),()=>_0x242a2f['disconnect']();}__name(observerDashboard,'observerDashboard');function onInitDashboardPage(_0x42d8a3,_0xdaf2ec,_0x1cdb1e){const _0x5b7241=observerDashboard(_0x42d8a3,_0x1cdb1e);return setDashboardReports(_0xdaf2ec),_0x5b7241;}__name(onInitDashboardPage,'onInitDashboardPage');

export { dashboardLayoutConfig, observerDashboard, onInitDashboardPage, setDashboardReports };
