# 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 (
    InputFloat,
)

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


class Normalize(BaseNode):
    """
    Map values to 0 to 1 range, based on the minimum and maximum pixel values

    Parameters
    ----------
    value : InputFloat
        Value

    Inputs
    ------
    i.value : FloatSocket
        Value

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

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

    class _Inputs(SocketAccessor):
        value: FloatSocket
        """Value"""

    class _Outputs(SocketAccessor):
        value: FloatSocket
        """Value"""

    if TYPE_CHECKING:

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

    def __init__(self, value: InputFloat = 1.0):
        super().__init__()
        key_args = {"Value": value}

        self._establish_links(**key_args)
