const DefaultDashboardSize = {
    widthInDashboardUnits: 12,
    heightInDashboardUnits: 60,
};
export const SpaceBetweenUnitsInPx = 10;
export const MarginForEachUnitInPx = 10 / 2;
export const GetDashboardUnitWidthInPx = (currentTotalDashboardWidthInPx) => {
    return ((currentTotalDashboardWidthInPx -
        (DefaultDashboardSize.widthInDashboardUnits - 1) *
            SpaceBetweenUnitsInPx) /
        DefaultDashboardSize.widthInDashboardUnits);
};
export const GetDashboardUnitHeightInPx = (currentTotalDashboardWidthInPx) => {
    return GetDashboardUnitWidthInPx(currentTotalDashboardWidthInPx); // its a square, so height is the same as width
};
export const GetHeightOfDashboardComponent = (heightInDashboardUnits, totalCurrentDashboardWidthInPx) => {
    return (heightInDashboardUnits *
        GetDashboardUnitHeightInPx(totalCurrentDashboardWidthInPx) +
        (heightInDashboardUnits - 1) * SpaceBetweenUnitsInPx);
};
export const GetWidthOfDashboardComponent = (widthInDashboardUnits, totalCurrentDashboardWidthInPx) => {
    return (widthInDashboardUnits *
        GetDashboardUnitWidthInPx(totalCurrentDashboardWidthInPx) +
        (widthInDashboardUnits - 1) * SpaceBetweenUnitsInPx);
};
export const GetDashboardComponentWidthInDashboardUnits = (currentTotalDashboardWidthInPx, componentWidthInPx) => {
    const eachUnitSizeInPx = currentTotalDashboardWidthInPx /
        DefaultDashboardSize.widthInDashboardUnits; // each square is these many pixels
    // now check how many squares can fit in the component width
    const units = Math.ceil(componentWidthInPx / eachUnitSizeInPx);
    if (units < 1) {
        return 1;
    }
    return units;
};
export const GetDashboardComponentHeightInDashboardUnits = (currentTotalDashboardWidthInPx, componentHeightInPx) => {
    const eachUnitSizeInPx = currentTotalDashboardWidthInPx /
        DefaultDashboardSize.widthInDashboardUnits; // each square is these many pixels
    // now check how many squares can fit in the component height
    const units = Math.ceil(componentHeightInPx / eachUnitSizeInPx);
    if (units < 1) {
        return 1;
    }
    return units;
};
export default DefaultDashboardSize;
//# sourceMappingURL=DashboardSize.js.map