"use client";
import "react";
import { useAppSelector as r } from "../state/hooks.js";
import { selectChartViewBox as s, selectChartOffsetInternal as h } from "../state/selectors/selectChartOffsetInternal.js";
import { selectChartWidth as n, selectChartHeight as u } from "../state/selectors/containerSelectors.js";
import { useIsPanorama as l } from "./PanoramaContext.js";
import { selectBrushDimensions as m, selectBrushSettings as p } from "../state/selectors/brushSelectors.js";
var B = () => {
  var t, a = l(), i = r(s), o = r(m), e = (t = r(p)) === null || t === void 0 ? void 0 : t.padding;
  return !a || !o || !e ? i : {
    width: o.width - e.left - e.right,
    height: o.height - e.top - e.bottom,
    x: e.left,
    y: e.top
  };
}, f = {
  top: 0,
  bottom: 0,
  left: 0,
  right: 0,
  width: 0,
  height: 0,
  brushBottom: 0
}, b = () => {
  var t;
  return (t = r(h)) !== null && t !== void 0 ? t : f;
}, x = () => r(n), I = () => r(u), S = () => r((t) => t.layout.margin), v = (t) => t.layout.layoutType, A = () => r(v);
export {
  v as selectChartLayout,
  I as useChartHeight,
  A as useChartLayout,
  x as useChartWidth,
  S as useMargin,
  b as useOffsetInternal,
  B as useViewBox
};
