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

from typing import TYPE_CHECKING

import bpy

from ...builder import BaseNode, SocketAccessor

from ...types import (
    InputColor,
    InputFloat,
)

from ...builder.socket import (
    ColorSocket,
    FloatSocket,
)


class Gamma(BaseNode):
    """
    Apply a gamma correction

    Parameters
    ----------
    color : InputColor
        Color
    gamma : InputFloat
        Gamma

    Inputs
    ------
    i.color : ColorSocket
        Color
    i.gamma : FloatSocket
        Gamma

    Outputs
    -------
    o.color : ColorSocket
        Color
    """

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

    class _Inputs(SocketAccessor):
        color: ColorSocket
        """Color"""
        gamma: FloatSocket
        """Gamma"""

    class _Outputs(SocketAccessor):
        color: ColorSocket
        """Color"""

    if TYPE_CHECKING:

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

    def __init__(
        self,
        color: InputColor = None,
        gamma: InputFloat = 1.0,
    ):
        super().__init__()
        key_args = {"Color": color, "Gamma": gamma}

        self._establish_links(**key_args)


class RGBCurves(BaseNode):
    """
    Apply color corrections for each color channel

    Parameters
    ----------
    fac : InputFloat
        Factor
    color : InputColor
        Color

    Inputs
    ------
    i.fac : FloatSocket
        Factor
    i.color : ColorSocket
        Color

    Outputs
    -------
    o.color : ColorSocket
        Color
    """

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

    class _Inputs(SocketAccessor):
        fac: FloatSocket
        """Factor"""
        color: ColorSocket
        """Color"""

    class _Outputs(SocketAccessor):
        color: ColorSocket
        """Color"""

    if TYPE_CHECKING:

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

    def __init__(
        self,
        fac: InputFloat = 1.0,
        color: InputColor = None,
    ):
        super().__init__()
        key_args = {"Fac": fac, "Color": color}

        self._establish_links(**key_args)
