"""A waveguide bend PCell with two parameters: radius and width."""

import photonforge as pf
import photonforge.typing as pft

__version__ = "1.0"


@pf.parametric_component
def waveguide_bend(
    *, radius: pft.PositiveDimension = 3.0, width: pft.PositiveDimension = 0.5
):
    """A 90 degree bend: a quarter of a ring, so radius and width show."""
    c = pf.Component("bend")   # the name of the component in the project
    ring = pf.Circle(
        radius=radius + width / 2, inner_radius=radius - width / 2, sector=(0, 90)
    )
    c.add("WG_CORE", ring)
    return c
