from typing import Self
from typing import TypeVar
from pyautd3.derive import builder
from pyautd3.derive import datagram
from pyautd3.derive import modulation
from pyautd3.derive.derive_datagram import datagram_with_segment
from pyautd3.driver.datagram.modulation import ModulationWithSamplingConfig
from pyautd3.driver.defined.angle import Angle
from pyautd3.driver.defined.angle import rad
from pyautd3.driver.defined.freq import Freq
from pyautd3.driver.defined.freq import Hz
from pyautd3.driver.firmware.fpga.sampling_config import SamplingConfig
from pyautd3.modulation.sampling_mode import ISamplingMode
from pyautd3.modulation.sampling_mode import SamplingModeExact
from pyautd3.modulation.sampling_mode import SamplingModeExactFloat
from pyautd3.modulation.sampling_mode import SamplingModeNearest
from pyautd3.native_methods.autd3capi_driver import ModulationPtr
from pyautd3.modulation.cache import Cache
from pyautd3.modulation.fir import Fir
from collections.abc import Iterable
from pyautd3.modulation.radiation_pressure import RadiationPressure
from datetime import timedelta
from pyautd3.driver.datagram.with_timeout import DatagramWithTimeout
from pyautd3.driver.datagram.with_parallel_threshold import DatagramWithParallelThreshold
from pyautd3.native_methods.autd3capi_driver import Segment, TransitionModeWrap
from pyautd3.driver.datagram.with_segment import DatagramWithSegment

T = TypeVar("T", int, float)

class Sine(ModulationWithSamplingConfig):
    _mode: ISamplingMode
    def __private__init__(self: Sine, mode: ISamplingMode) -> None: ...
    def __init__(self: Sine, freq: Freq[T]) -> None: ...
    def _modulation_ptr(self: Sine, ) -> ModulationPtr: ...
    def with_intensity(self: Sine, intensity: int) -> Sine: ...
    def with_offset(self: Sine, offset: int) -> Sine: ...
    def with_phase(self: Sine, phase: Angle) -> Sine: ...
    def with_clamp(self: Sine, clamp: bool) -> Sine: ...
    def with_cache(self: Sine, ) -> Cache[Sine]: ...
    def with_fir(self: Sine, iterable: Iterable[float]) -> Fir[Sine]: ...
    def with_radiation_pressure(self: Sine, ) -> RadiationPressure[Sine]: ...
    def with_timeout(self: Sine, timeout: timedelta | None) -> DatagramWithTimeout[Sine]: ...
    def with_parallel_threshold(self: Sine, threshold: int | None) -> DatagramWithParallelThreshold[Sine]: ...
    def with_segment(self: Sine, segment: Segment, transition_mode: TransitionModeWrap | None) -> DatagramWithSegment[Sine]: ...
    @classmethod
    def nearest(cls, freq: Freq[float]) -> Sine: ...
    @property
    def freq(self: Sine) -> Freq[int] | Freq[float]: ...
    @property
    def intensity(self: Sine) -> int: ...
    @property
    def offset(self: Sine) -> int: ...
    @property
    def phase(self: Sine) -> Angle: ...
    @property
    def clamp(self: Sine) -> bool: ...
