# This file is automatically generated by pyo3_stub_gen
# ruff: noqa: E501, F401, F403, F405

import builtins
import typing
__all__ = [
    "EncodeOutput",
    "Encoder",
    "GcodeDialectSpec",
    "GcodeSpec",
    "TextureSpec",
    "VertexSpec",
]

class EncodeOutput:
    r"""
    Non-Ops artifact produced by an Encode stage.
    """
    @property
    def variant(self) -> builtins.str:
        r"""
        The variant's name: ``"MachineCode"``, ``"VertexArrays"``, or
        ``"Texture"``.
        """
    @property
    def text(self) -> typing.Optional[builtins.str]:
        r"""
        The G-code text. Returns ``None`` unless this is the
        ``MachineCode`` variant.
        """
    @property
    def op_to_machine_code(self) -> typing.Optional[builtins.dict[builtins.int, builtins.list[builtins.int]]]:
        r"""
        Mapping ``op_index -> list of machine-code line indices``.
        Returns ``None`` unless this is the ``MachineCode`` variant.
        """
    @property
    def machine_code_to_op(self) -> typing.Optional[builtins.dict[builtins.int, builtins.int]]:
        r"""
        Mapping ``machine-code line index -> op_index``.
        Returns ``None`` unless this is the ``MachineCode`` variant.
        """
    @property
    def repr(self) -> typing.Optional[builtins.str]:
        r"""
        The vertex-array debug repr. Returns ``None`` unless this is
        the ``VertexArrays`` variant.
        """
    @property
    def power_texture(self) -> typing.Optional[builtins.list[builtins.int]]:
        r"""
        Raw texture bytes (row-major uint8 power map). Returns
        ``None`` unless this is the ``Texture`` variant.
        """
    @property
    def width_px(self) -> typing.Optional[builtins.int]:
        r"""
        Texture width in pixels. Returns ``None`` unless this is the
        ``Texture`` variant.
        """
    @property
    def height_px(self) -> typing.Optional[builtins.int]:
        r"""
        Texture height in pixels. Returns ``None`` unless this is the
        ``Texture`` variant.
        """
    def __repr__(self) -> builtins.str:
        r"""
        Variant name as a string: ``"MachineCode"``, ``"VertexArrays"``,
        or ``"Texture"``.
        """
    @typing.final
    class MachineCode(EncodeOutput):
        __match_args__ = ("text", "op_to_machine_code", "machine_code_to_op",)
        @property
        def text(self) -> builtins.str: ...
        @property
        def op_to_machine_code(self) -> builtins.dict[builtins.int, builtins.list[builtins.int]]: ...
        @property
        def machine_code_to_op(self) -> builtins.dict[builtins.int, builtins.int]: ...
        def __new__(cls, text: builtins.str, op_to_machine_code: typing.Mapping[builtins.int, typing.Sequence[builtins.int]], machine_code_to_op: typing.Mapping[builtins.int, builtins.int]) -> EncodeOutput.MachineCode: ...
    
    @typing.final
    class VertexArrays(EncodeOutput):
        __match_args__ = ("repr",)
        @property
        def repr(self) -> builtins.str: ...
        def __new__(cls, repr: builtins.str) -> EncodeOutput.VertexArrays: ...
    
    @typing.final
    class Texture(EncodeOutput):
        __match_args__ = ("power_texture", "width_px", "height_px",)
        @property
        def power_texture(self) -> builtins.list[builtins.int]: ...
        @property
        def width_px(self) -> builtins.int: ...
        @property
        def height_px(self) -> builtins.int: ...
        def __new__(cls, power_texture: typing.Sequence[builtins.int], width_px: builtins.int, height_px: builtins.int) -> EncodeOutput.Texture: ...
    

@typing.final
class Encoder:
    r"""
    Python-visible wrapper around an encoder spec.
    
    Construct as ``Encoder(spec)`` where `spec` is an instance of one
    of the encoder spec classes under `raygeo.ops.convert` (e.g.
    :class:`~raygeo.ops.convert.GcodeSpec`). Callers that drive the
    `Encoder` trait hold an `Encoder` instance.
    """
    @property
    def spec(self) -> typing.Any:
        r"""
        The wrapped Python-side spec object. Type-erased here;
        dispatched to a concrete `Box<dyn Encoder>` by
        [`PyEncoder::into_core`].
        """
    def __new__(cls, spec: typing.Any) -> Encoder:
        r"""
        Construct an `Encoder` wrapping a spec object.
        
        :param spec: An encoder spec instance (e.g.
            :class:`~raygeo.ops.convert.GcodeSpec`).
        """
    def __repr__(self) -> builtins.str: ...

@typing.final
class GcodeDialectSpec:
    r"""
    Typed Python wrapper around the Rust ``GcodeDialectSpec``.
    
    Constructed in Python with keyword arguments; the inner Rust
    struct is passed directly to the encoder without a serde round-trip.
    """
    def __new__(cls, laser_on: builtins.str = 'M4 S{power:.0f}', laser_off: builtins.str = 'M5', tool_change: builtins.str = 'T{tool_number}', set_speed: builtins.str = 'G1 F{speed:.0f}', travel_move: builtins.str = 'G0{x_cmd}{y_cmd}{z_cmd}{extra_cmd}{f_command}{s_command}', linear_move: builtins.str = 'G1{x_cmd}{y_cmd}{z_cmd}{extra_cmd}{f_command}{s_command}', arc_cw: builtins.str = 'G2{x_cmd}{y_cmd}{z_cmd} I{i} J{j}{extra_cmd}{f_command}{s_command}', arc_ccw: builtins.str = 'G3{x_cmd}{y_cmd}{z_cmd} I{i} J{j}{extra_cmd}{f_command}{s_command}', air_assist_on: builtins.str = 'M8', air_assist_off: builtins.str = 'M9', bezier_cubic: builtins.str = '', spindle_on_cw: builtins.str = 'M3 S{rpm}', spindle_on_ccw: builtins.str = 'M4 S{rpm}', spindle_off: builtins.str = 'M5', coolant_flood: builtins.str = 'M8', coolant_mist: builtins.str = 'M7', coolant_off: builtins.str = 'M9', dwell: builtins.str = 'G4 P{seconds:.3f}', preamble: typing.Sequence[builtins.str] = ['G90'], postscript: typing.Sequence[builtins.str] = ['M30'], inject_wcs_after_preamble: builtins.bool = False, can_g0_with_speed: builtins.bool = False, omit_unchanged_coords: builtins.bool = True, continuous_laser_mode: builtins.bool = False, modal_feedrate: builtins.bool = False, gcode_precision: builtins.int = 3) -> GcodeDialectSpec: ...
    def __repr__(self) -> builtins.str: ...

@typing.final
class GcodeSpec:
    r"""
    Parameters for the G-code encoder.
    """
    @property
    def dialect(self) -> GcodeDialectSpec: ...
    @property
    def context_json(self) -> builtins.str: ...
    def __new__(cls, dialect: GcodeDialectSpec, context_json: builtins.str) -> GcodeSpec: ...

@typing.final
class TextureSpec:
    r"""
    Parameters for the texture encoder.
    """
    @property
    def width_px(self) -> builtins.int: ...
    @property
    def height_px(self) -> builtins.int: ...
    @property
    def px_per_mm(self) -> tuple[builtins.float, builtins.float]: ...
    @property
    def origin_mm(self) -> tuple[builtins.float, builtins.float]: ...
    def __eq__(self, other: builtins.object, /) -> builtins.bool: ...
    def __new__(cls, width_px: builtins.int, height_px: builtins.int, px_per_mm: tuple[builtins.float, builtins.float], origin_mm: tuple[builtins.float, builtins.float]) -> TextureSpec: ...

@typing.final
class VertexSpec:
    r"""
    Parameters for the vertex-array encoder.
    """
    @property
    def _tag(self) -> builtins.bool: ...
    def __eq__(self, other: builtins.object, /) -> builtins.bool: ...
    def __new__(cls) -> VertexSpec: ...

