def cond(condition: Any, c1: Any, c2: Any = types.Unset(), /) -> Component | Var:
    """Create a conditional component or Prop.

    Args:
        condition: The cond to determine which component to render.
        c1: The component or prop to render if the cond_var is true.
        c2: The component or prop to render if the cond_var is false.

    Returns:
        The conditional component.

    Raises:
        ValueError: If the arguments are invalid.
    """
    # Convert the condition to a Var.
    cond_var = LiteralVar.create(condition)
    if cond_var is None:
        msg = "The condition must be set."
        raise ValueError(msg)

    # If the first component is a component, create a Cond component.
    if isinstance(c1, BaseComponent):
        if not isinstance(c2, types.Unset) and not isinstance(c2, BaseComponent):
            return Cond.create(cond_var.bool(), c1, Fragment.create(c2))
        return Cond.create(cond_var.bool(), c1, c2)

    # Otherwise, create a conditional Var.
    # Check that the second argument is valid.
    if isinstance(c2, BaseComponent):
        return Cond.create(cond_var.bool(), Fragment.create(c1), c2)
    if isinstance(c2, types.Unset):
        msg = "For conditional vars, the second argument must be set."
        raise ValueError(msg)

    # convert the truth and false cond parts into vars so the _var_data can be obtained.
    c1_var = Var.create(c1)
    c2_var = Var.create(c2)

    if c1_var is cond_var or c1_var.equals(cond_var):
        c1_var = c1_var.to(types.value_inside_optional(c1_var._var_type))

    # Create the conditional var.
    return ternary_operation(
        cond_var.bool(),
        c1_var,
        c2_var,
    )
Create a conditional component or Prop.

    Args:
        condition: The cond to determine which component to render.
        c1: The component or prop to render if the cond_var is true.
        c2: The component or prop to render if the cond_var is false.

    Returns:
        The conditional component.

    Raises:
        ValueError: If the arguments are invalid.
    
reflex/components/core/cond.py