# Auto-generated by `python -m gen` — do not edit manually.

from typing import TYPE_CHECKING, Literal

import bpy

from ...builder import BaseNode, SocketAccessor

from ...types import (
    InputBoolean,
    InputColor,
    InputFloat,
    InputInteger,
    InputMenu,
    InputVector,
)

from ...builder.socket import (
    BooleanSocket,
    ColorSocket,
    FloatSocket,
    IntegerSocket,
    MenuSocket,
    VectorSocket,
)


class CornerPin(BaseNode):
    """
    Plane warp transformation using explicit corner values

    Parameters
    ----------
    image : InputColor
        Image
    upper_left : InputVector
        Upper Left
    upper_right : InputVector
        Upper Right
    lower_left : InputVector
        Lower Left
    lower_right : InputVector
        Lower Right
    interpolation : InputMenu | Literal['Nearest', 'Bilinear', 'Bicubic', 'Anisotropic']
        Interpolation
    extension_x : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension X
    extension_y : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension Y

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.upper_left : VectorSocket
        Upper Left
    i.upper_right : VectorSocket
        Upper Right
    i.lower_left : VectorSocket
        Lower Left
    i.lower_right : VectorSocket
        Lower Right
    i.interpolation : MenuSocket
        Interpolation
    i.extension_x : MenuSocket
        Extension X
    i.extension_y : MenuSocket
        Extension Y

    Outputs
    -------
    o.image : ColorSocket
        Image
    o.plane : FloatSocket
        Plane
    """

    _bl_idname = "CompositorNodeCornerPin"
    node: bpy.types.CompositorNodeCornerPin

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        upper_left: VectorSocket
        """Upper Left"""
        upper_right: VectorSocket
        """Upper Right"""
        lower_left: VectorSocket
        """Lower Left"""
        lower_right: VectorSocket
        """Lower Right"""
        interpolation: MenuSocket
        """Interpolation"""
        extension_x: MenuSocket
        """Extension X"""
        extension_y: MenuSocket
        """Extension Y"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        plane: FloatSocket
        """Plane"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        image: InputColor = None,
        upper_left: InputVector = None,
        upper_right: InputVector = None,
        lower_left: InputVector = None,
        lower_right: InputVector = None,
        interpolation: InputMenu
        | Literal["Nearest", "Bilinear", "Bicubic", "Anisotropic"] = "Bilinear",
        extension_x: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
        extension_y: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
    ):
        super().__init__()
        key_args = {
            "Image": image,
            "Upper Left": upper_left,
            "Upper Right": upper_right,
            "Lower Left": lower_left,
            "Lower Right": lower_right,
            "Interpolation": interpolation,
            "Extension X": extension_x,
            "Extension Y": extension_y,
        }

        self._establish_links(**key_args)


class Crop(BaseNode):
    """
    Crops image to a smaller region, either making the cropped area transparent or resizing the image

    Parameters
    ----------
    image : InputColor
        Image
    x : InputInteger
        X
    y : InputInteger
        Y
    width : InputInteger
        Width
    height : InputInteger
        Height
    alpha_crop : InputBoolean
        Alpha Crop

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.x : IntegerSocket
        X
    i.y : IntegerSocket
        Y
    i.width : IntegerSocket
        Width
    i.height : IntegerSocket
        Height
    i.alpha_crop : BooleanSocket
        Alpha Crop

    Outputs
    -------
    o.image : ColorSocket
        Image
    """

    _bl_idname = "CompositorNodeCrop"
    node: bpy.types.CompositorNodeCrop

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        x: IntegerSocket
        """X"""
        y: IntegerSocket
        """Y"""
        width: IntegerSocket
        """Width"""
        height: IntegerSocket
        """Height"""
        alpha_crop: BooleanSocket
        """Alpha Crop"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        image: InputColor = None,
        x: InputInteger = 0,
        y: InputInteger = 0,
        width: InputInteger = 1920,
        height: InputInteger = 1080,
        alpha_crop: InputBoolean = False,
    ):
        super().__init__()
        key_args = {
            "Image": image,
            "X": x,
            "Y": y,
            "Width": width,
            "Height": height,
            "Alpha Crop": alpha_crop,
        }

        self._establish_links(**key_args)


class Displace(BaseNode):
    """
    Displace pixel position using an offset vector

    Parameters
    ----------
    image : InputColor
        Image
    displacement : InputVector
        Displacement
    interpolation : InputMenu | Literal['Nearest', 'Bilinear', 'Bicubic', 'Anisotropic']
        Interpolation
    extension_x : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension X
    extension_y : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension Y

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.displacement : VectorSocket
        Displacement
    i.interpolation : MenuSocket
        Interpolation
    i.extension_x : MenuSocket
        Extension X
    i.extension_y : MenuSocket
        Extension Y

    Outputs
    -------
    o.image : ColorSocket
        Image
    """

    _bl_idname = "CompositorNodeDisplace"
    node: bpy.types.CompositorNodeDisplace

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        displacement: VectorSocket
        """Displacement"""
        interpolation: MenuSocket
        """Interpolation"""
        extension_x: MenuSocket
        """Extension X"""
        extension_y: MenuSocket
        """Extension Y"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        image: InputColor = None,
        displacement: InputVector = None,
        interpolation: InputMenu
        | Literal["Nearest", "Bilinear", "Bicubic", "Anisotropic"] = "Bilinear",
        extension_x: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
        extension_y: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
    ):
        super().__init__()
        key_args = {
            "Image": image,
            "Displacement": displacement,
            "Interpolation": interpolation,
            "Extension X": extension_x,
            "Extension Y": extension_y,
        }

        self._establish_links(**key_args)


class Flip(BaseNode):
    """
    Flip an image along a defined axis

    Parameters
    ----------
    image : InputColor
        Image
    flip_x : InputBoolean
        Flip X
    flip_y : InputBoolean
        Flip Y

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.flip_x : BooleanSocket
        Flip X
    i.flip_y : BooleanSocket
        Flip Y

    Outputs
    -------
    o.image : ColorSocket
        Image
    """

    _bl_idname = "CompositorNodeFlip"
    node: bpy.types.CompositorNodeFlip

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        flip_x: BooleanSocket
        """Flip X"""
        flip_y: BooleanSocket
        """Flip Y"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        image: InputColor = None,
        flip_x: InputBoolean = False,
        flip_y: InputBoolean = False,
    ):
        super().__init__()
        key_args = {"Image": image, "Flip X": flip_x, "Flip Y": flip_y}

        self._establish_links(**key_args)


class LensDistortion(BaseNode):
    """
    Simulate distortion and dispersion from camera lenses

    Parameters
    ----------
    image : InputColor
        Image
    type : InputMenu | Literal['Radial', 'Horizontal']
        Type
    distortion : InputFloat
        Distortion
    dispersion : InputFloat
        Dispersion
    jitter : InputBoolean
        Jitter
    fit : InputBoolean
        Fit

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.type : MenuSocket
        Type
    i.distortion : FloatSocket
        Distortion
    i.dispersion : FloatSocket
        Dispersion
    i.jitter : BooleanSocket
        Jitter
    i.fit : BooleanSocket
        Fit

    Outputs
    -------
    o.image : ColorSocket
        Image
    """

    _bl_idname = "CompositorNodeLensdist"
    node: bpy.types.CompositorNodeLensdist

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        type: MenuSocket
        """Type"""
        distortion: FloatSocket
        """Distortion"""
        dispersion: FloatSocket
        """Dispersion"""
        jitter: BooleanSocket
        """Jitter"""
        fit: BooleanSocket
        """Fit"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        image: InputColor = None,
        type: InputMenu | Literal["Radial", "Horizontal"] = "Radial",
        distortion: InputFloat = 0.0,
        dispersion: InputFloat = 0.0,
        jitter: InputBoolean = False,
        fit: InputBoolean = False,
    ):
        super().__init__()
        key_args = {
            "Image": image,
            "Type": type,
            "Distortion": distortion,
            "Dispersion": dispersion,
            "Jitter": jitter,
            "Fit": fit,
        }

        self._establish_links(**key_args)

    @classmethod
    def radial(
        cls,
        image: InputColor = None,
        distortion: InputFloat = 0.0,
        dispersion: InputFloat = 0.0,
        jitter: InputBoolean = False,
        fit: InputBoolean = False,
    ) -> "LensDistortion":
        """Create Lens Distortion node with type 'Radial'."""
        return cls(
            image=image,
            distortion=distortion,
            dispersion=dispersion,
            jitter=jitter,
            fit=fit,
            type="Radial",
        )

    @classmethod
    def horizontal(
        cls, image: InputColor = None, dispersion: InputFloat = 0.0
    ) -> "LensDistortion":
        """Create Lens Distortion node with type 'Horizontal'."""
        return cls(image=image, dispersion=dispersion, type="Horizontal")


class MapUV(BaseNode):
    """
    Map a texture using UV coordinates, to apply a texture to objects in compositing

    Parameters
    ----------
    image : InputColor
        Image
    uv : InputVector
        UV
    interpolation : InputMenu | Literal['Nearest', 'Bilinear', 'Bicubic', 'Anisotropic']
        Interpolation
    extension_x : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension X
    extension_y : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension Y

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.uv : VectorSocket
        UV
    i.interpolation : MenuSocket
        Interpolation
    i.extension_x : MenuSocket
        Extension X
    i.extension_y : MenuSocket
        Extension Y

    Outputs
    -------
    o.image : ColorSocket
        Image
    """

    _bl_idname = "CompositorNodeMapUV"
    node: bpy.types.CompositorNodeMapUV

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        uv: VectorSocket
        """UV"""
        interpolation: MenuSocket
        """Interpolation"""
        extension_x: MenuSocket
        """Extension X"""
        extension_y: MenuSocket
        """Extension Y"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        image: InputColor = None,
        uv: InputVector = None,
        interpolation: InputMenu
        | Literal["Nearest", "Bilinear", "Bicubic", "Anisotropic"] = "Bilinear",
        extension_x: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
        extension_y: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
    ):
        super().__init__()
        key_args = {
            "Image": image,
            "UV": uv,
            "Interpolation": interpolation,
            "Extension X": extension_x,
            "Extension Y": extension_y,
        }

        self._establish_links(**key_args)


class MovieDistortion(BaseNode):
    """
    Remove lens distortion from footage, using motion tracking camera lens settings

    Parameters
    ----------
    image : InputColor
        Image
    type : InputMenu | Literal['Undistort', 'Distort']
        Type

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.type : MenuSocket
        Type

    Outputs
    -------
    o.image : ColorSocket
        Image
    """

    _bl_idname = "CompositorNodeMovieDistortion"
    node: bpy.types.CompositorNodeMovieDistortion

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        type: MenuSocket
        """Type"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        image: InputColor = None,
        type: InputMenu | Literal["Undistort", "Distort"] = "Undistort",
    ):
        super().__init__()
        key_args = {"Image": image, "Type": type}

        self._establish_links(**key_args)

    @classmethod
    def undistort(cls, image: InputColor = None) -> "MovieDistortion":
        """Create Movie Distortion node with type 'Undistort'."""
        return cls(image=image, type="Undistort")

    @classmethod
    def distort(cls, image: InputColor = None) -> "MovieDistortion":
        """Create Movie Distortion node with type 'Distort'."""
        return cls(image=image, type="Distort")


class PlaneTrackDeform(BaseNode):
    """
    Replace flat planes in footage by another image, detected by plane tracks from motion tracking

    Parameters
    ----------
    image : InputColor
        Image
    motion_blur : InputBoolean
        Motion Blur
    motion_blur_samples : InputInteger
        Samples
    motion_blur_shutter : InputFloat
        Shutter

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.motion_blur : BooleanSocket
        Motion Blur
    i.motion_blur_samples : IntegerSocket
        Samples
    i.motion_blur_shutter : FloatSocket
        Shutter

    Outputs
    -------
    o.image : ColorSocket
        Image
    o.plane : FloatSocket
        Plane
    """

    _bl_idname = "CompositorNodePlaneTrackDeform"
    node: bpy.types.CompositorNodePlaneTrackDeform

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        motion_blur: BooleanSocket
        """Motion Blur"""
        motion_blur_samples: IntegerSocket
        """Samples"""
        motion_blur_shutter: FloatSocket
        """Shutter"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        plane: FloatSocket
        """Plane"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        image: InputColor = None,
        motion_blur: InputBoolean = False,
        motion_blur_samples: InputInteger = 16,
        motion_blur_shutter: InputFloat = 0.5,
        *,
        tracking_object: str = "",
        plane_track_name: str = "",
    ):
        super().__init__()
        key_args = {
            "Image": image,
            "Motion Blur": motion_blur,
            "Motion Blur Samples": motion_blur_samples,
            "Motion Blur Shutter": motion_blur_shutter,
        }
        self.tracking_object = tracking_object
        self.plane_track_name = plane_track_name
        self._establish_links(**key_args)

    @property
    def tracking_object(self) -> str:
        return self.node.tracking_object

    @tracking_object.setter
    def tracking_object(self, value: str):
        self.node.tracking_object = value

    @property
    def plane_track_name(self) -> str:
        return self.node.plane_track_name

    @plane_track_name.setter
    def plane_track_name(self, value: str):
        self.node.plane_track_name = value


class Rotate(BaseNode):
    """
    Rotate image by specified angle

    Parameters
    ----------
    image : InputColor
        Image
    angle : InputFloat
        Angle
    interpolation : InputMenu | Literal['Nearest', 'Bilinear', 'Bicubic', 'Anisotropic']
        Interpolation
    extension_x : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension X
    extension_y : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension Y

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.angle : FloatSocket
        Angle
    i.interpolation : MenuSocket
        Interpolation
    i.extension_x : MenuSocket
        Extension X
    i.extension_y : MenuSocket
        Extension Y

    Outputs
    -------
    o.image : ColorSocket
        Image
    """

    _bl_idname = "CompositorNodeRotate"
    node: bpy.types.CompositorNodeRotate

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        angle: FloatSocket
        """Angle"""
        interpolation: MenuSocket
        """Interpolation"""
        extension_x: MenuSocket
        """Extension X"""
        extension_y: MenuSocket
        """Extension Y"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        image: InputColor = None,
        angle: InputFloat = 0.0,
        interpolation: InputMenu
        | Literal["Nearest", "Bilinear", "Bicubic", "Anisotropic"] = "Bilinear",
        extension_x: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
        extension_y: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
    ):
        super().__init__()
        key_args = {
            "Image": image,
            "Angle": angle,
            "Interpolation": interpolation,
            "Extension X": extension_x,
            "Extension Y": extension_y,
        }

        self._establish_links(**key_args)


class Scale(BaseNode):
    """
    Change the size of the image

    Parameters
    ----------
    image : InputColor
        Image
    type : InputMenu | Literal['Relative', 'Absolute', 'Scene Size', 'Render Size']
        Type
    x : InputFloat
        X
    y : InputFloat
        Y
    frame_type : InputMenu | Literal['Stretch', 'Fit', 'Crop']
        Frame Type
    interpolation : InputMenu | Literal['Nearest', 'Bilinear', 'Bicubic', 'Anisotropic']
        Interpolation
    extension_x : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension X
    extension_y : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension Y

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.type : MenuSocket
        Type
    i.x : FloatSocket
        X
    i.y : FloatSocket
        Y
    i.frame_type : MenuSocket
        Frame Type
    i.interpolation : MenuSocket
        Interpolation
    i.extension_x : MenuSocket
        Extension X
    i.extension_y : MenuSocket
        Extension Y

    Outputs
    -------
    o.image : ColorSocket
        Image
    """

    _bl_idname = "CompositorNodeScale"
    node: bpy.types.CompositorNodeScale

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        type: MenuSocket
        """Type"""
        x: FloatSocket
        """X"""
        y: FloatSocket
        """Y"""
        frame_type: MenuSocket
        """Frame Type"""
        interpolation: MenuSocket
        """Interpolation"""
        extension_x: MenuSocket
        """Extension X"""
        extension_y: MenuSocket
        """Extension Y"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        image: InputColor = None,
        type: InputMenu
        | Literal["Relative", "Absolute", "Scene Size", "Render Size"] = "Relative",
        x: InputFloat = 1.0,
        y: InputFloat = 1.0,
        frame_type: InputMenu | Literal["Stretch", "Fit", "Crop"] = "Stretch",
        interpolation: InputMenu
        | Literal["Nearest", "Bilinear", "Bicubic", "Anisotropic"] = "Bilinear",
        extension_x: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
        extension_y: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
    ):
        super().__init__()
        key_args = {
            "Image": image,
            "Type": type,
            "X": x,
            "Y": y,
            "Frame Type": frame_type,
            "Interpolation": interpolation,
            "Extension X": extension_x,
            "Extension Y": extension_y,
        }

        self._establish_links(**key_args)

    @classmethod
    def relative(
        cls,
        image: InputColor = None,
        x: InputFloat = 1.0,
        y: InputFloat = 1.0,
        interpolation: InputMenu
        | Literal["Nearest", "Bilinear", "Bicubic", "Anisotropic"] = "Bilinear",
        extension_x: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
        extension_y: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
    ) -> "Scale":
        """Create Scale node with type 'Relative'."""
        return cls(
            image=image,
            x=x,
            y=y,
            interpolation=interpolation,
            extension_x=extension_x,
            extension_y=extension_y,
            type="Relative",
        )

    @classmethod
    def absolute(
        cls,
        image: InputColor = None,
        x: InputFloat = 1.0,
        y: InputFloat = 1.0,
        interpolation: InputMenu
        | Literal["Nearest", "Bilinear", "Bicubic", "Anisotropic"] = "Bilinear",
        extension_x: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
        extension_y: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
    ) -> "Scale":
        """Create Scale node with type 'Absolute'."""
        return cls(
            image=image,
            x=x,
            y=y,
            interpolation=interpolation,
            extension_x=extension_x,
            extension_y=extension_y,
            type="Absolute",
        )

    @classmethod
    def scene_size(
        cls,
        image: InputColor = None,
        interpolation: InputMenu
        | Literal["Nearest", "Bilinear", "Bicubic", "Anisotropic"] = "Bilinear",
        extension_x: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
        extension_y: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
    ) -> "Scale":
        """Create Scale node with type 'Scene Size'."""
        return cls(
            image=image,
            interpolation=interpolation,
            extension_x=extension_x,
            extension_y=extension_y,
            type="Scene Size",
        )

    @classmethod
    def render_size(
        cls,
        image: InputColor = None,
        frame_type: InputMenu | Literal["Stretch", "Fit", "Crop"] = "Stretch",
        interpolation: InputMenu
        | Literal["Nearest", "Bilinear", "Bicubic", "Anisotropic"] = "Bilinear",
        extension_x: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
        extension_y: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
    ) -> "Scale":
        """Create Scale node with type 'Render Size'."""
        return cls(
            image=image,
            frame_type=frame_type,
            interpolation=interpolation,
            extension_x=extension_x,
            extension_y=extension_y,
            type="Render Size",
        )


class Stabilize2D(BaseNode):
    """
    Stabilize footage using 2D stabilization motion tracking settings

    Parameters
    ----------
    image : InputColor
        Image
    frame : InputInteger
        Frame
    invert : InputBoolean
        Invert
    interpolation : InputMenu | Literal['Nearest', 'Bilinear', 'Bicubic', 'Anisotropic']
        Interpolation
    extension_x : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension X
    extension_y : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension Y

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.frame : IntegerSocket
        Frame
    i.invert : BooleanSocket
        Invert
    i.interpolation : MenuSocket
        Interpolation
    i.extension_x : MenuSocket
        Extension X
    i.extension_y : MenuSocket
        Extension Y

    Outputs
    -------
    o.image : ColorSocket
        Image
    """

    _bl_idname = "CompositorNodeStabilize"
    node: bpy.types.CompositorNodeStabilize

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        frame: IntegerSocket
        """Frame"""
        invert: BooleanSocket
        """Invert"""
        interpolation: MenuSocket
        """Interpolation"""
        extension_x: MenuSocket
        """Extension X"""
        extension_y: MenuSocket
        """Extension Y"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        image: InputColor = None,
        frame: InputInteger = 0,
        invert: InputBoolean = False,
        interpolation: InputMenu
        | Literal["Nearest", "Bilinear", "Bicubic", "Anisotropic"] = "Bilinear",
        extension_x: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
        extension_y: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
    ):
        super().__init__()
        key_args = {
            "Image": image,
            "Frame": frame,
            "Invert": invert,
            "Interpolation": interpolation,
            "Extension X": extension_x,
            "Extension Y": extension_y,
        }

        self._establish_links(**key_args)


class Transform(BaseNode):
    """
    Scale, translate and rotate an image

    Parameters
    ----------
    image : InputColor
        Image
    x : InputFloat
        X
    y : InputFloat
        Y
    angle : InputFloat
        Angle
    scale : InputFloat
        Scale
    interpolation : InputMenu | Literal['Nearest', 'Bilinear', 'Bicubic', 'Anisotropic']
        Interpolation
    extension_x : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension X
    extension_y : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension Y

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.x : FloatSocket
        X
    i.y : FloatSocket
        Y
    i.angle : FloatSocket
        Angle
    i.scale : FloatSocket
        Scale
    i.interpolation : MenuSocket
        Interpolation
    i.extension_x : MenuSocket
        Extension X
    i.extension_y : MenuSocket
        Extension Y

    Outputs
    -------
    o.image : ColorSocket
        Image
    """

    _bl_idname = "CompositorNodeTransform"
    node: bpy.types.CompositorNodeTransform

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        x: FloatSocket
        """X"""
        y: FloatSocket
        """Y"""
        angle: FloatSocket
        """Angle"""
        scale: FloatSocket
        """Scale"""
        interpolation: MenuSocket
        """Interpolation"""
        extension_x: MenuSocket
        """Extension X"""
        extension_y: MenuSocket
        """Extension Y"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        image: InputColor = None,
        x: InputFloat = 0.0,
        y: InputFloat = 0.0,
        angle: InputFloat = 0.0,
        scale: InputFloat = 1.0,
        interpolation: InputMenu
        | Literal["Nearest", "Bilinear", "Bicubic", "Anisotropic"] = "Bilinear",
        extension_x: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
        extension_y: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
    ):
        super().__init__()
        key_args = {
            "Image": image,
            "X": x,
            "Y": y,
            "Angle": angle,
            "Scale": scale,
            "Interpolation": interpolation,
            "Extension X": extension_x,
            "Extension Y": extension_y,
        }

        self._establish_links(**key_args)


class Translate(BaseNode):
    """
    Offset an image

    Parameters
    ----------
    image : InputColor
        Image
    x : InputFloat
        X
    y : InputFloat
        Y
    interpolation : InputMenu | Literal['Nearest', 'Bilinear', 'Bicubic', 'Anisotropic']
        Interpolation
    extension_x : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension X
    extension_y : InputMenu | Literal['Clip', 'Extend', 'Repeat']
        Extension Y

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.x : FloatSocket
        X
    i.y : FloatSocket
        Y
    i.interpolation : MenuSocket
        Interpolation
    i.extension_x : MenuSocket
        Extension X
    i.extension_y : MenuSocket
        Extension Y

    Outputs
    -------
    o.image : ColorSocket
        Image
    """

    _bl_idname = "CompositorNodeTranslate"
    node: bpy.types.CompositorNodeTranslate

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        x: FloatSocket
        """X"""
        y: FloatSocket
        """Y"""
        interpolation: MenuSocket
        """Interpolation"""
        extension_x: MenuSocket
        """Extension X"""
        extension_y: MenuSocket
        """Extension Y"""

    class _Outputs(SocketAccessor):
        image: ColorSocket
        """Image"""

    if TYPE_CHECKING:

        @property
        def i(self) -> _Inputs: ...
        @property
        def o(self) -> _Outputs: ...

    def __init__(
        self,
        image: InputColor = None,
        x: InputFloat = 0.0,
        y: InputFloat = 0.0,
        interpolation: InputMenu
        | Literal["Nearest", "Bilinear", "Bicubic", "Anisotropic"] = "Bilinear",
        extension_x: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
        extension_y: InputMenu | Literal["Clip", "Extend", "Repeat"] = "Clip",
    ):
        super().__init__()
        key_args = {
            "Image": image,
            "X": x,
            "Y": y,
            "Interpolation": interpolation,
            "Extension X": extension_x,
            "Extension Y": extension_y,
        }

        self._establish_links(**key_args)
