import * as AlloyTriggers from '../../api/events/AlloyTriggers';
import * as ModelCommon from './ModelCommon';
import { halfX, halfY, max1X, max1Y, min1X, min1Y } from './SliderValues';
const xyValue = (x, y) => ({
    x,
    y
});
const fireSliderChange = (component, value) => {
    AlloyTriggers.emitWith(component, ModelCommon.sliderChangeEvent(), { value });
};
// North West XY
const setToTLEdgeXY = (edge, detail) => {
    fireSliderChange(edge, xyValue(min1X(detail), min1Y(detail)));
};
// North
const setToTEdge = (edge, detail) => {
    fireSliderChange(edge, min1Y(detail));
};
// North XY
const setToTEdgeXY = (edge, detail) => {
    fireSliderChange(edge, xyValue(halfX(detail), min1Y(detail)));
};
// North East XY
const setToTREdgeXY = (edge, detail) => {
    fireSliderChange(edge, xyValue(max1X(detail), min1Y(detail)));
};
// East
const setToREdge = (edge, detail) => {
    fireSliderChange(edge, max1X(detail));
};
// East XY
const setToREdgeXY = (edge, detail) => {
    fireSliderChange(edge, xyValue(max1X(detail), halfY(detail)));
};
// South East XY
const setToBREdgeXY = (edge, detail) => {
    fireSliderChange(edge, xyValue(max1X(detail), max1Y(detail)));
};
// South
const setToBEdge = (edge, detail) => {
    fireSliderChange(edge, max1Y(detail));
};
// South XY
const setToBEdgeXY = (edge, detail) => {
    fireSliderChange(edge, xyValue(halfX(detail), max1Y(detail)));
};
// South West XY
const setToBLEdgeXY = (edge, detail) => {
    fireSliderChange(edge, xyValue(min1X(detail), max1Y(detail)));
};
// West
const setToLEdge = (edge, detail) => {
    fireSliderChange(edge, min1X(detail));
};
// West XY
const setToLEdgeXY = (edge, detail) => {
    fireSliderChange(edge, xyValue(min1X(detail), halfY(detail)));
};
export { setToTLEdgeXY, setToTEdge, setToTEdgeXY, setToTREdgeXY, setToREdge, setToREdgeXY, setToBREdgeXY, setToBEdge, setToBEdgeXY, setToBLEdgeXY, setToLEdge, setToLEdgeXY };
//# sourceMappingURL=EdgeActions.js.map