import React, { createContext, useContext } from 'react';

/** 供日视图拆分出的子组件读取 `calendarProps` / 明暗，避免每层透传（可选使用） */

var BookingCalendarDayChromeContext = /*#__PURE__*/createContext(null);
export function BookingCalendarDayChromeProvider(_ref) {
  var children = _ref.children,
    value = _ref.value;
  return /*#__PURE__*/React.createElement(BookingCalendarDayChromeContext.Provider, {
    value: value
  }, children);
}
export function useBookingCalendarDayChrome() {
  var v = useContext(BookingCalendarDayChromeContext);
  if (!v) {
    throw new Error('useBookingCalendarDayChrome must be used within BookingCalendarDayChromeProvider');
  }
  return v;
}