# 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 BrightnessContrast(BaseNode):
    """
    Control the brightness and contrast of the input color

    Parameters
    ----------
    color : InputColor
        Color
    bright : InputFloat
        Brightness
    contrast : InputFloat
        Contrast

    Inputs
    ------
    i.color : ColorSocket
        Color
    i.bright : FloatSocket
        Brightness
    i.contrast : FloatSocket
        Contrast

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

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

    class _Inputs(SocketAccessor):
        color: ColorSocket
        """Color"""
        bright: FloatSocket
        """Brightness"""
        contrast: FloatSocket
        """Contrast"""

    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,
        bright: InputFloat = 0.0,
        contrast: InputFloat = 0.0,
    ):
        super().__init__()
        key_args = {"Color": color, "Bright": bright, "Contrast": contrast}

        self._establish_links(**key_args)


class HueSaturationValue(BaseNode):
    """
    Apply a color transformation in the HSV color model

    Parameters
    ----------
    hue : InputFloat
        Hue
    saturation : InputFloat
        Saturation
    value : InputFloat
        Value
    fac : InputFloat
        Factor
    color : InputColor
        Color

    Inputs
    ------
    i.hue : FloatSocket
        Hue
    i.saturation : FloatSocket
        Saturation
    i.value : FloatSocket
        Value
    i.fac : FloatSocket
        Factor
    i.color : ColorSocket
        Color

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

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

    class _Inputs(SocketAccessor):
        hue: FloatSocket
        """Hue"""
        saturation: FloatSocket
        """Saturation"""
        value: FloatSocket
        """Value"""
        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,
        hue: InputFloat = 0.5,
        saturation: InputFloat = 1.0,
        value: InputFloat = 1.0,
        fac: InputFloat = 1.0,
        color: InputColor = None,
    ):
        super().__init__()
        key_args = {
            "Hue": hue,
            "Saturation": saturation,
            "Value": value,
            "Fac": fac,
            "Color": color,
        }

        self._establish_links(**key_args)


class InvertColor(BaseNode):
    """
    Invert a color, producing a negative

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

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

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

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

    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)


class LightFalloff(BaseNode):
    """
    Manipulate how light intensity decreases over distance. Typically used for non-physically-based effects; in reality light always falls off quadratically

    Parameters
    ----------
    strength : InputFloat
        Strength
    smooth : InputFloat
        Smooth

    Inputs
    ------
    i.strength : FloatSocket
        Strength
    i.smooth : FloatSocket
        Smooth

    Outputs
    -------
    o.quadratic : FloatSocket
        Quadratic
    o.linear : FloatSocket
        Linear
    o.constant : FloatSocket
        Constant
    """

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

    class _Inputs(SocketAccessor):
        strength: FloatSocket
        """Strength"""
        smooth: FloatSocket
        """Smooth"""

    class _Outputs(SocketAccessor):
        quadratic: FloatSocket
        """Quadratic"""
        linear: FloatSocket
        """Linear"""
        constant: FloatSocket
        """Constant"""

    if TYPE_CHECKING:

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

    def __init__(
        self,
        strength: InputFloat = 100.0,
        smooth: InputFloat = 0.0,
    ):
        super().__init__()
        key_args = {"Strength": strength, "Smooth": smooth}

        self._establish_links(**key_args)
