//#region src/types/sdcpn.d.ts
type ID = string;
type InputArc = {
  placeId: string;
  weight: number;
  type: "standard" | "inhibitor";
};
type OutputArc = {
  placeId: string;
  weight: number;
};
type Transition = {
  id: ID;
  name: string;
  inputArcs: InputArc[];
  outputArcs: OutputArc[];
  lambdaType: "predicate" | "stochastic";
  lambdaCode: string;
  transitionKernelCode: string;
  x: number;
  y: number;
};
type Place = {
  id: ID;
  name: string;
  colorId: null | ID;
  dynamicsEnabled: boolean;
  differentialEquationId: null | ID;
  visualizerCode?: string;
  showAsInitialState?: boolean;
  x: number;
  y: number;
};
type Color = {
  id: ID;
  name: string;
  iconSlug: string;
  displayColor: string;
  elements: {
    elementId: string;
    name: string;
    type: "real" | "integer" | "boolean";
  }[];
};
type Parameter = {
  id: ID;
  name: string;
  variableName: string;
  type: "real" | "integer" | "boolean";
  defaultValue: string;
};
type DifferentialEquation = {
  id: ID;
  name: string;
  colorId: ID | null;
  code: string;
};
/**
 * A parameter scoped to a specific scenario (distinct from net-level Parameters).
 */
type ScenarioParameter = {
  type: "real" | "integer" | "boolean" | "ratio";
  identifier: string;
  default: number;
};
/**
 * A scenario defines a reusable configuration for simulating an SDCPN.
 *
 * It can introduce its own parameters, override values of existing net-level
 * parameters, and specify the initial token state for each place.
 */
type Scenario = {
  id: ID;
  name: string;
  description?: string; /** Parameters that only exist within this scenario. */
  scenarioParameters: ScenarioParameter[];
  /**
   * Overrides for existing net-level parameters.
   * Keys are parameter IDs from the SDCPN; values are concrete values or
   * expressions (expression support will be added later).
   */
  parameterOverrides: Record<ID, string>;
  /**
   * Initial token state definition. Either per-place expressions or a single
   * code block that returns an object mapping place names to token arrays.
   */
  initialState: {
    /**
     * Per-place initial state. Values are either:
     * - `string`: expression for uncolored places (evaluates to token count)
     * - `number[][]`: token data for colored places (rows × elements)
     */
    type: "per_place";
    content: Record<ID, string | number[][]>;
  } | {
    /** Single code block that returns the full initial state object. */type: "code";
    content: string;
  };
};
/**
 * A metric is a user-authored function that takes the current simulation state
 * (places with token counts and, for colored places, named token attributes)
 * and returns a single number to be plotted over time on the timeline chart.
 */
type Metric = {
  id: ID;
  name: string;
  description?: string;
  /**
   * Function body invoked with `state` in scope. Must `return` a number.
   * See `MetricState` (in `simulation/compile-metric.ts`) for the input shape.
   */
  code: string;
};
type SDCPN = {
  places: Place[];
  transitions: Transition[];
  types: Color[];
  differentialEquations: DifferentialEquation[];
  parameters: Parameter[];
  scenarios?: Scenario[];
  metrics?: Metric[];
};
type MinimalNetMetadata = {
  netId: string;
  title: string;
  lastUpdated: string;
};
type MutateSDCPN = (mutateFn: (sdcpn: SDCPN) => void) => void;
//#endregion
export { Metric as a, OutputArc as c, SDCPN as d, Scenario as f, InputArc as i, Parameter as l, Transition as m, DifferentialEquation as n, MinimalNetMetadata as o, ScenarioParameter as p, ID as r, MutateSDCPN as s, Color as t, Place as u };
//# sourceMappingURL=sdcpn-CayOVwJM.d.ts.map