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

from typing import TYPE_CHECKING, Generic, Literal

import bpy

from ...builder import BaseNode, SocketAccessor, Socket

from ...types import (
    InputBoolean,
    InputColor,
    InputFloat,
    InputFont,
    InputInteger,
    InputIntegerVector,
    InputLinkable,
    InputMatrix,
    InputMenu,
    InputObject,
    InputRotation,
    InputString,
    InputVector,
    InputAny,
)

from ...builder.socket import (
    BooleanSocket,
    ColorSocket,
    FloatSocket,
    FontSocket,
    IntegerSocket,
    MatrixSocket,
    MenuSocket,
    ObjectSocket,
    RotationSocket,
    StringSocket,
    VectorSocket,
    _T,
    _S,
)


class AlphaConvert(BaseNode):
    """
    Convert to and from premultiplied (associated) alpha

    Parameters
    ----------
    image : InputColor
        Image
    type : InputMenu | Literal['To Premultiplied', 'To Straight']
        Type

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

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

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

    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["To Premultiplied", "To Straight"] = "To Premultiplied",
    ):
        super().__init__()
        key_args = {"Image": image, "Type": type}

        self._establish_links(**key_args)

    @classmethod
    def to_premultiplied(cls, image: InputColor = None) -> "AlphaConvert":
        """Create Alpha Convert node with type 'To Premultiplied'."""
        return cls(image=image, type="To Premultiplied")

    @classmethod
    def to_straight(cls, image: InputColor = None) -> "AlphaConvert":
        """Create Alpha Convert node with type 'To Straight'."""
        return cls(image=image, type="To Straight")


class CombineColor(BaseNode):
    """
    Combine an image from its composite color channels

    Parameters
    ----------
    red : InputFloat
        Red
    green : InputFloat
        Green
    blue : InputFloat
        Blue
    alpha : InputFloat
        Alpha

    Inputs
    ------
    i.red : FloatSocket
        Red
    i.green : FloatSocket
        Green
    i.blue : FloatSocket
        Blue
    i.alpha : FloatSocket
        Alpha

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

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

    class _Inputs(SocketAccessor):
        red: FloatSocket
        """Red"""
        green: FloatSocket
        """Green"""
        blue: FloatSocket
        """Blue"""
        alpha: FloatSocket
        """Alpha"""

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

    if TYPE_CHECKING:

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

    def __init__(
        self,
        red: InputFloat = 0.0,
        green: InputFloat = 0.0,
        blue: InputFloat = 0.0,
        alpha: InputFloat = 1.0,
        *,
        mode: Literal["RGB", "HSV", "HSL", "YCC", "YUV"] = "RGB",
        ycc_mode: Literal["ITUBT601", "ITUBT709", "JFIF"] = "ITUBT709",
    ):
        super().__init__()
        key_args = {"Red": red, "Green": green, "Blue": blue, "Alpha": alpha}
        self.mode = mode
        self.ycc_mode = ycc_mode
        self._establish_links(**key_args)

    @classmethod
    def rgb(
        cls,
        red: InputFloat = 0.0,
        green: InputFloat = 0.0,
        blue: InputFloat = 0.0,
        alpha: InputFloat = 1.0,
    ) -> "CombineColor":
        """Create Combine Color with operation 'RGB'. Use RGB (Red, Green, Blue) color processing"""
        return cls(mode="RGB", red=red, green=green, blue=blue, alpha=alpha)

    @classmethod
    def hsv(
        cls,
        red: InputFloat = 0.0,
        green: InputFloat = 0.0,
        blue: InputFloat = 0.0,
        alpha: InputFloat = 1.0,
    ) -> "CombineColor":
        """Create Combine Color with operation 'HSV'. Use HSV (Hue, Saturation, Value) color processing"""
        return cls(mode="HSV", red=red, green=green, blue=blue, alpha=alpha)

    @classmethod
    def hsl(
        cls,
        red: InputFloat = 0.0,
        green: InputFloat = 0.0,
        blue: InputFloat = 0.0,
        alpha: InputFloat = 1.0,
    ) -> "CombineColor":
        """Create Combine Color with operation 'HSL'. Use HSL (Hue, Saturation, Lightness) color processing"""
        return cls(mode="HSL", red=red, green=green, blue=blue, alpha=alpha)

    @classmethod
    def ycbcr(
        cls,
        red: InputFloat = 0.0,
        green: InputFloat = 0.0,
        blue: InputFloat = 0.0,
        alpha: InputFloat = 1.0,
    ) -> "CombineColor":
        """Create Combine Color with operation 'YCbCr'. Use YCbCr (Y - luma, Cb - blue-difference chroma, Cr - red-difference chroma) color processing"""
        return cls(mode="YCC", red=red, green=green, blue=blue, alpha=alpha)

    @classmethod
    def yuv(
        cls,
        red: InputFloat = 0.0,
        green: InputFloat = 0.0,
        blue: InputFloat = 0.0,
        alpha: InputFloat = 1.0,
    ) -> "CombineColor":
        """Create Combine Color with operation 'YUV'. Use YUV (Y - luma, U V - chroma) color processing"""
        return cls(mode="YUV", red=red, green=green, blue=blue, alpha=alpha)

    @property
    def mode(self) -> Literal["RGB", "HSV", "HSL", "YCC", "YUV"]:
        return self.node.mode

    @mode.setter
    def mode(self, value: Literal["RGB", "HSV", "HSL", "YCC", "YUV"]):
        self.node.mode = value

    @property
    def ycc_mode(self) -> Literal["ITUBT601", "ITUBT709", "JFIF"]:
        return self.node.ycc_mode

    @ycc_mode.setter
    def ycc_mode(self, value: Literal["ITUBT601", "ITUBT709", "JFIF"]):
        self.node.ycc_mode = value


class ConvertToDisplay(BaseNode):
    """
    Convert from scene linear to display color space, with a view transform and look for tone mapping

    Parameters
    ----------
    image : InputColor
        Image
    invert : InputBoolean
        Invert

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.invert : BooleanSocket
        Invert

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

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

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        invert: BooleanSocket
        """Invert"""

    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,
        invert: InputBoolean = False,
    ):
        super().__init__()
        key_args = {"Image": image, "Invert": invert}

        self._establish_links(**key_args)


class IDMask(BaseNode):
    """
    Create a matte from an object or material index pass

    Parameters
    ----------
    id_value : InputFloat
        ID value
    index : InputInteger
        Index
    anti_alias : InputBoolean
        Anti-Alias

    Inputs
    ------
    i.id_value : FloatSocket
        ID value
    i.index : IntegerSocket
        Index
    i.anti_alias : BooleanSocket
        Anti-Alias

    Outputs
    -------
    o.alpha : FloatSocket
        Alpha
    """

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

    class _Inputs(SocketAccessor):
        id_value: FloatSocket
        """ID value"""
        index: IntegerSocket
        """Index"""
        anti_alias: BooleanSocket
        """Anti-Alias"""

    class _Outputs(SocketAccessor):
        alpha: FloatSocket
        """Alpha"""

    if TYPE_CHECKING:

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

    def __init__(
        self,
        id_value: InputFloat = 1.0,
        index: InputInteger = 0,
        anti_alias: InputBoolean = False,
    ):
        super().__init__()
        key_args = {"ID value": id_value, "Index": index, "Anti-Alias": anti_alias}

        self._establish_links(**key_args)


class ImplicitConversion(BaseNode, Generic[_T]):
    """
    Implicitly convert the input value to a fixed socket type

    Parameters
    ----------
    value : InputColor
        Value

    Inputs
    ------
    i.value : ColorSocket
        Value

    Outputs
    -------
    o.value : ColorSocket
        Value
    """

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

    class _Inputs(SocketAccessor, Generic[_S]):
        value: _S
        """Value"""

    class _Outputs(SocketAccessor, Generic[_S]):
        value: _S
        """Value"""

    if TYPE_CHECKING:

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

    def __init__(
        self,
        value: InputAny = None,
        *,
        data_type: Literal[
            "FLOAT",
            "INT",
            "BOOLEAN",
            "VECTOR",
            "RGBA",
            "ROTATION",
            "MATRIX",
            "STRING",
            "MENU",
            "OBJECT",
            "FONT",
            "INT_VECTOR",
        ] = "RGBA",
    ):
        super().__init__()
        key_args = {"Value": value}
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(cls, value: InputFloat = 0.0) -> "ImplicitConversion[FloatSocket]":
        """Create Implicit Conversion with operation 'Float'."""
        return ImplicitConversion(data_type="FLOAT", value=value)

    @classmethod
    def integer(cls, value: InputInteger = 0) -> "ImplicitConversion[IntegerSocket]":
        """Create Implicit Conversion with operation 'Integer'."""
        return ImplicitConversion(data_type="INT", value=value)

    @classmethod
    def boolean(
        cls, value: InputBoolean = False
    ) -> "ImplicitConversion[BooleanSocket]":
        """Create Implicit Conversion with operation 'Boolean'."""
        return ImplicitConversion(data_type="BOOLEAN", value=value)

    @classmethod
    def vector(cls, value: InputVector = None) -> "ImplicitConversion[VectorSocket]":
        """Create Implicit Conversion with operation 'Vector'."""
        return ImplicitConversion(data_type="VECTOR", value=value)

    @classmethod
    def color(cls, value: InputColor = None) -> "ImplicitConversion[ColorSocket]":
        """Create Implicit Conversion with operation 'Color'."""
        return ImplicitConversion(data_type="RGBA", value=value)

    @classmethod
    def rotation(
        cls, value: InputRotation = None
    ) -> "ImplicitConversion[RotationSocket]":
        """Create Implicit Conversion with operation 'Rotation'."""
        return ImplicitConversion(data_type="ROTATION", value=value)

    @classmethod
    def matrix(cls, value: InputMatrix = None) -> "ImplicitConversion[MatrixSocket]":
        """Create Implicit Conversion with operation 'Matrix'."""
        return ImplicitConversion(data_type="MATRIX", value=value)

    @classmethod
    def string(cls, value: InputString = "") -> "ImplicitConversion[StringSocket]":
        """Create Implicit Conversion with operation 'String'."""
        return ImplicitConversion(data_type="STRING", value=value)

    @classmethod
    def menu(cls, value: InputMenu = None) -> "ImplicitConversion[MenuSocket]":
        """Create Implicit Conversion with operation 'Menu'."""
        return ImplicitConversion(data_type="MENU", value=value)

    @classmethod
    def object(cls, value: InputObject = None) -> "ImplicitConversion[ObjectSocket]":
        """Create Implicit Conversion with operation 'Object'."""
        return ImplicitConversion(data_type="OBJECT", value=value)

    @classmethod
    def font(cls, value: InputFont = None) -> "ImplicitConversion[FontSocket]":
        """Create Implicit Conversion with operation 'Font'."""
        return ImplicitConversion(data_type="FONT", value=value)

    @classmethod
    def integer_vector(
        cls, value: InputIntegerVector = None
    ) -> "ImplicitConversion[IntegerSocket]":
        """Create Implicit Conversion with operation 'Integer Vector'."""
        return ImplicitConversion(data_type="INT_VECTOR", value=value)

    @property
    def data_type(
        self,
    ) -> Literal[
        "FLOAT",
        "INT",
        "BOOLEAN",
        "VECTOR",
        "RGBA",
        "ROTATION",
        "MATRIX",
        "STRING",
        "MENU",
        "OBJECT",
        "FONT",
        "INT_VECTOR",
    ]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(
        self,
        value: Literal[
            "FLOAT",
            "INT",
            "BOOLEAN",
            "VECTOR",
            "RGBA",
            "ROTATION",
            "MATRIX",
            "STRING",
            "MENU",
            "OBJECT",
            "FONT",
            "INT_VECTOR",
        ],
    ):
        self.node.data_type = value


class IndexSwitch(BaseNode, Generic[_T]):
    """
    Choose between an arbitrary number of values with an index

    Parameters
    ----------
    index : InputInteger
        Index
    item_0 : InputColor
        0
    item_1 : InputColor
        1
    extend : InputLinkable


    Inputs
    ------
    i.index : IntegerSocket
        Index
    i.item_0 : ColorSocket
        0
    i.item_1 : ColorSocket
        1
    i.extend : Socket


    Outputs
    -------
    o.output : ColorSocket
        Output
    """

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

    class _Inputs(SocketAccessor, Generic[_S]):
        index: IntegerSocket
        """Index"""
        item_0: _S
        """0"""
        item_1: _S
        """1"""
        extend: Socket

    class _Outputs(SocketAccessor, Generic[_S]):
        output: _S
        """Output"""

    if TYPE_CHECKING:

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

    def __init__(
        self,
        index: InputInteger = 0,
        item_0: InputAny = None,
        item_1: InputAny = None,
        extend: InputLinkable = None,
        *,
        data_type: Literal[
            "FLOAT",
            "INT",
            "BOOLEAN",
            "VECTOR",
            "RGBA",
            "ROTATION",
            "MATRIX",
            "STRING",
            "MENU",
            "OBJECT",
            "FONT",
            "INT_VECTOR",
        ] = "RGBA",
    ):
        super().__init__()
        key_args = {
            "Index": index,
            "Item_0": item_0,
            "Item_1": item_1,
            "__extend__": extend,
        }
        self.data_type = data_type
        self._establish_links(**key_args)

    @classmethod
    def float(
        cls,
        index: InputInteger = 0,
        item_0: InputFloat = 0.0,
        item_1: InputFloat = 0.0,
        extend: InputLinkable = None,
    ) -> "IndexSwitch[FloatSocket]":
        """Create Index Switch with operation 'Float'."""
        return IndexSwitch(
            data_type="FLOAT", index=index, item_0=item_0, item_1=item_1, extend=extend
        )

    @classmethod
    def integer(
        cls,
        index: InputInteger = 0,
        item_0: InputInteger = 0,
        item_1: InputInteger = 0,
        extend: InputLinkable = None,
    ) -> "IndexSwitch[IntegerSocket]":
        """Create Index Switch with operation 'Integer'."""
        return IndexSwitch(
            data_type="INT", index=index, item_0=item_0, item_1=item_1, extend=extend
        )

    @classmethod
    def boolean(
        cls,
        index: InputInteger = 0,
        item_0: InputBoolean = False,
        item_1: InputBoolean = False,
        extend: InputLinkable = None,
    ) -> "IndexSwitch[BooleanSocket]":
        """Create Index Switch with operation 'Boolean'."""
        return IndexSwitch(
            data_type="BOOLEAN",
            index=index,
            item_0=item_0,
            item_1=item_1,
            extend=extend,
        )

    @classmethod
    def vector(
        cls,
        index: InputInteger = 0,
        item_0: InputVector = None,
        item_1: InputVector = None,
        extend: InputLinkable = None,
    ) -> "IndexSwitch[VectorSocket]":
        """Create Index Switch with operation 'Vector'."""
        return IndexSwitch(
            data_type="VECTOR", index=index, item_0=item_0, item_1=item_1, extend=extend
        )

    @classmethod
    def color(
        cls,
        index: InputInteger = 0,
        item_0: InputColor = None,
        item_1: InputColor = None,
        extend: InputLinkable = None,
    ) -> "IndexSwitch[ColorSocket]":
        """Create Index Switch with operation 'Color'."""
        return IndexSwitch(
            data_type="RGBA", index=index, item_0=item_0, item_1=item_1, extend=extend
        )

    @classmethod
    def rotation(
        cls,
        index: InputInteger = 0,
        item_0: InputRotation = None,
        item_1: InputRotation = None,
        extend: InputLinkable = None,
    ) -> "IndexSwitch[RotationSocket]":
        """Create Index Switch with operation 'Rotation'."""
        return IndexSwitch(
            data_type="ROTATION",
            index=index,
            item_0=item_0,
            item_1=item_1,
            extend=extend,
        )

    @classmethod
    def matrix(
        cls,
        index: InputInteger = 0,
        item_0: InputMatrix = None,
        item_1: InputMatrix = None,
        extend: InputLinkable = None,
    ) -> "IndexSwitch[MatrixSocket]":
        """Create Index Switch with operation 'Matrix'."""
        return IndexSwitch(
            data_type="MATRIX", index=index, item_0=item_0, item_1=item_1, extend=extend
        )

    @classmethod
    def string(
        cls,
        index: InputInteger = 0,
        item_0: InputString = "",
        item_1: InputString = "",
        extend: InputLinkable = None,
    ) -> "IndexSwitch[StringSocket]":
        """Create Index Switch with operation 'String'."""
        return IndexSwitch(
            data_type="STRING", index=index, item_0=item_0, item_1=item_1, extend=extend
        )

    @classmethod
    def menu(
        cls,
        index: InputInteger = 0,
        item_0: InputMenu = None,
        item_1: InputMenu = None,
        extend: InputLinkable = None,
    ) -> "IndexSwitch[MenuSocket]":
        """Create Index Switch with operation 'Menu'."""
        return IndexSwitch(
            data_type="MENU", index=index, item_0=item_0, item_1=item_1, extend=extend
        )

    @classmethod
    def object(
        cls,
        index: InputInteger = 0,
        item_0: InputObject = None,
        item_1: InputObject = None,
        extend: InputLinkable = None,
    ) -> "IndexSwitch[ObjectSocket]":
        """Create Index Switch with operation 'Object'."""
        return IndexSwitch(
            data_type="OBJECT", index=index, item_0=item_0, item_1=item_1, extend=extend
        )

    @classmethod
    def font(
        cls,
        index: InputInteger = 0,
        item_0: InputFont = None,
        item_1: InputFont = None,
        extend: InputLinkable = None,
    ) -> "IndexSwitch[FontSocket]":
        """Create Index Switch with operation 'Font'."""
        return IndexSwitch(
            data_type="FONT", index=index, item_0=item_0, item_1=item_1, extend=extend
        )

    @classmethod
    def integer_vector(
        cls,
        index: InputInteger = 0,
        item_0: InputIntegerVector = None,
        item_1: InputIntegerVector = None,
        extend: InputLinkable = None,
    ) -> "IndexSwitch[IntegerSocket]":
        """Create Index Switch with operation 'Integer Vector'."""
        return IndexSwitch(
            data_type="INT_VECTOR",
            index=index,
            item_0=item_0,
            item_1=item_1,
            extend=extend,
        )

    @property
    def data_type(
        self,
    ) -> Literal[
        "FLOAT",
        "INT",
        "BOOLEAN",
        "VECTOR",
        "RGBA",
        "ROTATION",
        "MATRIX",
        "STRING",
        "MENU",
        "OBJECT",
        "FONT",
        "INT_VECTOR",
    ]:
        return self.node.data_type  # ty: ignore[invalid-return-type]

    @data_type.setter
    def data_type(
        self,
        value: Literal[
            "FLOAT",
            "INT",
            "BOOLEAN",
            "VECTOR",
            "RGBA",
            "ROTATION",
            "MATRIX",
            "STRING",
            "MENU",
            "OBJECT",
            "FONT",
            "INT_VECTOR",
        ],
    ):
        self.node.data_type = value


class Levels(BaseNode):
    """
    Compute average and standard deviation of pixel values

    Parameters
    ----------
    image : InputColor
        Image
    channel : InputMenu | Literal['Combined', 'Red', 'Green', 'Blue', 'Luminance']
        Channel

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.channel : MenuSocket
        Channel

    Outputs
    -------
    o.mean : FloatSocket
        Mean
    o.standard_deviation : FloatSocket
        Standard Deviation
    o.minimum : FloatSocket
        Minimum
    o.maximum : FloatSocket
        Maximum
    """

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

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        channel: MenuSocket
        """Channel"""

    class _Outputs(SocketAccessor):
        mean: FloatSocket
        """Mean"""
        standard_deviation: FloatSocket
        """Standard Deviation"""
        minimum: FloatSocket
        """Minimum"""
        maximum: FloatSocket
        """Maximum"""

    if TYPE_CHECKING:

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

    def __init__(
        self,
        image: InputColor = None,
        channel: InputMenu
        | Literal["Combined", "Red", "Green", "Blue", "Luminance"] = "Combined",
    ):
        super().__init__()
        key_args = {"Image": image, "Channel": channel}

        self._establish_links(**key_args)


class RGBToBW(BaseNode):
    """
    Convert RGB input into grayscale using luminance

    Parameters
    ----------
    image : InputColor
        Image

    Inputs
    ------
    i.image : ColorSocket
        Image

    Outputs
    -------
    o.val : FloatSocket
        Val
    """

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

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

    class _Outputs(SocketAccessor):
        val: FloatSocket
        """Val"""

    if TYPE_CHECKING:

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

    def __init__(self, image: InputColor = None):
        super().__init__()
        key_args = {"Image": image}

        self._establish_links(**key_args)


class RelativeToPixel(BaseNode):
    """
    Converts values that are relative to the image size to be in terms of pixels

    Parameters
    ----------
    vector_value : InputVector
        Value
    float_value : InputFloat
        Value
    image : InputColor
        Image

    Inputs
    ------
    i.vector_value : VectorSocket
        Value
    i.float_value : FloatSocket
        Value
    i.image : ColorSocket
        Image

    Outputs
    -------
    o.float_value : FloatSocket
        Value
    o.vector_value : VectorSocket
        Value
    """

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

    class _Inputs(SocketAccessor):
        vector_value: VectorSocket
        """Value"""
        float_value: FloatSocket
        """Value"""
        image: ColorSocket
        """Image"""

    class _Outputs(SocketAccessor):
        float_value: FloatSocket
        """Value"""
        vector_value: VectorSocket
        """Value"""

    if TYPE_CHECKING:

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

    def __init__(
        self,
        vector_value: InputVector = None,
        float_value: InputFloat = 0.0,
        image: InputColor = None,
        *,
        data_type: Literal["FLOAT", "VECTOR"] = "FLOAT",
        reference_dimension: Literal[
            "PER_DIMENSION", "X", "Y", "Greater", "Smaller", "Diagonal"
        ] = "X",
    ):
        super().__init__()
        key_args = {
            "Vector Value": vector_value,
            "Float Value": float_value,
            "Image": image,
        }
        self.data_type = data_type
        self.reference_dimension = reference_dimension
        self._establish_links(**key_args)

    @classmethod
    def float(
        cls, float_value: InputFloat = 0.0, image: InputColor = None
    ) -> "RelativeToPixel":
        """Create Relative To Pixel with operation 'Float'. Float value"""
        return cls(data_type="FLOAT", float_value=float_value, image=image)

    @classmethod
    def vector(
        cls, vector_value: InputVector = None, image: InputColor = None
    ) -> "RelativeToPixel":
        """Create Relative To Pixel with operation 'Vector'. Vector value"""
        return cls(data_type="VECTOR", vector_value=vector_value, image=image)

    @property
    def data_type(self) -> Literal["FLOAT", "VECTOR"]:
        return self.node.data_type

    @data_type.setter
    def data_type(self, value: Literal["FLOAT", "VECTOR"]):
        self.node.data_type = value

    @property
    def reference_dimension(
        self,
    ) -> Literal["PER_DIMENSION", "X", "Y", "Greater", "Smaller", "Diagonal"]:
        return self.node.reference_dimension

    @reference_dimension.setter
    def reference_dimension(
        self,
        value: Literal["PER_DIMENSION", "X", "Y", "Greater", "Smaller", "Diagonal"],
    ):
        self.node.reference_dimension = value


class SeparateColor(BaseNode):
    """
    Split an image into its composite color channels

    Parameters
    ----------
    image : InputColor
        Image

    Inputs
    ------
    i.image : ColorSocket
        Image

    Outputs
    -------
    o.red : FloatSocket
        Red
    o.green : FloatSocket
        Green
    o.blue : FloatSocket
        Blue
    o.alpha : FloatSocket
        Alpha
    """

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

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

    class _Outputs(SocketAccessor):
        red: FloatSocket
        """Red"""
        green: FloatSocket
        """Green"""
        blue: FloatSocket
        """Blue"""
        alpha: FloatSocket
        """Alpha"""

    if TYPE_CHECKING:

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

    def __init__(
        self,
        image: InputColor = None,
        *,
        mode: Literal["RGB", "HSV", "HSL", "YCC", "YUV"] = "RGB",
        ycc_mode: Literal["ITUBT601", "ITUBT709", "JFIF"] = "ITUBT709",
    ):
        super().__init__()
        key_args = {"Image": image}
        self.mode = mode
        self.ycc_mode = ycc_mode
        self._establish_links(**key_args)

    @classmethod
    def rgb(cls, image: InputColor = None) -> "SeparateColor":
        """Create Separate Color with operation 'RGB'. Use RGB (Red, Green, Blue) color processing"""
        return cls(mode="RGB", image=image)

    @classmethod
    def hsv(cls, image: InputColor = None) -> "SeparateColor":
        """Create Separate Color with operation 'HSV'. Use HSV (Hue, Saturation, Value) color processing"""
        return cls(mode="HSV", image=image)

    @classmethod
    def hsl(cls, image: InputColor = None) -> "SeparateColor":
        """Create Separate Color with operation 'HSL'. Use HSL (Hue, Saturation, Lightness) color processing"""
        return cls(mode="HSL", image=image)

    @classmethod
    def ycbcr(cls, image: InputColor = None) -> "SeparateColor":
        """Create Separate Color with operation 'YCbCr'. Use YCbCr (Y - luma, Cb - blue-difference chroma, Cr - red-difference chroma) color processing"""
        return cls(mode="YCC", image=image)

    @classmethod
    def yuv(cls, image: InputColor = None) -> "SeparateColor":
        """Create Separate Color with operation 'YUV'. Use YUV (Y - luma, U V - chroma) color processing"""
        return cls(mode="YUV", image=image)

    @property
    def mode(self) -> Literal["RGB", "HSV", "HSL", "YCC", "YUV"]:
        return self.node.mode

    @mode.setter
    def mode(self, value: Literal["RGB", "HSV", "HSL", "YCC", "YUV"]):
        self.node.mode = value

    @property
    def ycc_mode(self) -> Literal["ITUBT601", "ITUBT709", "JFIF"]:
        return self.node.ycc_mode

    @ycc_mode.setter
    def ycc_mode(self, value: Literal["ITUBT601", "ITUBT709", "JFIF"]):
        self.node.ycc_mode = value


class SetAlpha(BaseNode):
    """
    Add an alpha channel to an image

    Parameters
    ----------
    image : InputColor
        Image
    alpha : InputFloat
        Alpha
    type : InputMenu | Literal['Apply Mask', 'Replace Alpha']
        Type

    Inputs
    ------
    i.image : ColorSocket
        Image
    i.alpha : FloatSocket
        Alpha
    i.type : MenuSocket
        Type

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

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

    class _Inputs(SocketAccessor):
        image: ColorSocket
        """Image"""
        alpha: FloatSocket
        """Alpha"""
        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,
        alpha: InputFloat = 1.0,
        type: InputMenu | Literal["Apply Mask", "Replace Alpha"] = "Apply Mask",
    ):
        super().__init__()
        key_args = {"Image": image, "Alpha": alpha, "Type": type}

        self._establish_links(**key_args)

    @classmethod
    def apply_mask(
        cls, image: InputColor = None, alpha: InputFloat = 1.0
    ) -> "SetAlpha":
        """Create Set Alpha node with type 'Apply Mask'."""
        return cls(image=image, alpha=alpha, type="Apply Mask")

    @classmethod
    def replace_alpha(
        cls, image: InputColor = None, alpha: InputFloat = 1.0
    ) -> "SetAlpha":
        """Create Set Alpha node with type 'Replace Alpha'."""
        return cls(image=image, alpha=alpha, type="Replace Alpha")


class Split(BaseNode):
    """
    Combine two images for side-by-side display. Typically used in combination with a Viewer node

    Parameters
    ----------
    position : InputVector
        Position
    rotation : InputFloat
        Rotation
    image : InputColor
        Image
    image_001 : InputColor
        Image

    Inputs
    ------
    i.position : VectorSocket
        Position
    i.rotation : FloatSocket
        Rotation
    i.image : ColorSocket
        Image
    i.image_001 : ColorSocket
        Image

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

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

    class _Inputs(SocketAccessor):
        position: VectorSocket
        """Position"""
        rotation: FloatSocket
        """Rotation"""
        image: ColorSocket
        """Image"""
        image_001: ColorSocket
        """Image"""

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

    if TYPE_CHECKING:

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

    def __init__(
        self,
        position: InputVector = None,
        rotation: InputFloat = 0.7854,
        image: InputColor = None,
        image_001: InputColor = None,
    ):
        super().__init__()
        key_args = {
            "Position": position,
            "Rotation": rotation,
            "Image": image,
            "Image_001": image_001,
        }

        self._establish_links(**key_args)


class Switch(BaseNode):
    """
    Switch between two images using a checkbox

    Parameters
    ----------
    switch : InputBoolean
        Switch
    off : InputColor
        Off
    on : InputColor
        On

    Inputs
    ------
    i.switch : BooleanSocket
        Switch
    i.off : ColorSocket
        Off
    i.on : ColorSocket
        On

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

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

    class _Inputs(SocketAccessor):
        switch: BooleanSocket
        """Switch"""
        off: ColorSocket
        """Off"""
        on: ColorSocket
        """On"""

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

    if TYPE_CHECKING:

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

    def __init__(
        self,
        switch: InputBoolean = False,
        off: InputColor = None,
        on: InputColor = None,
    ):
        super().__init__()
        key_args = {"Switch": switch, "Off": off, "On": on}

        self._establish_links(**key_args)


class SwitchView(BaseNode):
    """
    Combine the views (left and right) into a single stereo 3D output

    Parameters
    ----------
    left : InputColor
        left
    right : InputColor
        right

    Inputs
    ------
    i.left : ColorSocket
        left
    i.right : ColorSocket
        right

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

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

    class _Inputs(SocketAccessor):
        left: ColorSocket
        """left"""
        right: ColorSocket
        """right"""

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

    if TYPE_CHECKING:

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

    def __init__(
        self,
        left: InputColor = None,
        right: InputColor = None,
    ):
        super().__init__()
        key_args = {"left": left, "right": right}

        self._establish_links(**key_args)
