use bone_types::{Point2, SketchDimensionId, SketchEntityId, SketchParameterId, SketchRelationId};

use super::dimension::{DimensionValue, SketchDimension};
use super::entity::SketchEntity;
use super::parameter::SketchParameter;
use super::relation::SketchRelation;

#[derive(Copy, Clone, Debug, PartialEq)]
pub enum SketchEdit {
    AddEntity(SketchEntity),
    AddRelation(SketchRelation),
    AddDimension(SketchDimension),
    AddParameter(SketchParameter),
    DeleteEntity(SketchEntityId),
    DeleteRelation(SketchRelationId),
    DeleteDimension(SketchDimensionId),
    DeleteParameter(SketchParameterId),
    MovePoint {
        id: SketchEntityId,
        position: Point2,
    },
    SetConstruction {
        id: SketchEntityId,
        for_construction: bool,
    },
    UpdateDimensionValue {
        id: SketchDimensionId,
        value: DimensionValue,
    },
}

#[derive(Copy, Clone, Debug, PartialEq)]
pub enum EditOutcome {
    Entity(SketchEntityId),
    Relation(SketchRelationId),
    Dimension(SketchDimensionId),
    Parameter(SketchParameterId),
    None,
}
