import { createContext } from "@lit/context";

//#region src/gui/timeline/timelineStateContext.ts
const timelineStateContext = createContext("timeline-state");
/**
* Convert time to pixel position
*/
function timeToPx(timeMs, pixelsPerMs) {
	return timeMs * pixelsPerMs;
}
/**
* Convert pixel position to time
*/
function pxToTime(px, pixelsPerMs) {
	return px / pixelsPerMs;
}
/**
* Default pixels per ms at 100% zoom (100 pixels per second)
*/
const DEFAULT_PIXELS_PER_MS = .1;
/**
* Timeline row height in pixels - must match --timeline-row-height CSS variable
*/
const TIMELINE_ROW_HEIGHT = 28;
/**
* Timeline track content height in pixels - must match --timeline-track-height CSS variable
*/
const TIMELINE_TRACK_HEIGHT = 22;
/**
* Vertical padding within a row (row height - track height) / 2
*/
const TIMELINE_ROW_PADDING = (TIMELINE_ROW_HEIGHT - TIMELINE_TRACK_HEIGHT) / 2;
/**
* Calculate zoom scale from pixels per ms
*/
function pixelsPerMsToZoom(pixelsPerMs) {
	return pixelsPerMs / DEFAULT_PIXELS_PER_MS;
}

//#endregion
export { DEFAULT_PIXELS_PER_MS, pixelsPerMsToZoom, pxToTime, timeToPx, timelineStateContext };
//# sourceMappingURL=timelineStateContext.js.map