import React from "react";
import { getPriceString, ProductPrice } from "../../index";
import { Chip, Select, SelectItem } from "@firecms/ui";
export interface SubscriptionPriceSelectParams {
productPrices: ProductPrice[] | undefined;
selectedPrice?: ProductPrice;
setSelectedPrice: (price?: ProductPrice) => void;
largePriceLabel: boolean;
fullWidth?: boolean;
}
export function SubscriptionPriceSelect({
productPrices,
setSelectedPrice,
largePriceLabel,
selectedPrice,
fullWidth = true
}: SubscriptionPriceSelectParams) {
return (productPrices ?? [])?.length > 1
? <>
>
: productPrices ?
(largePriceLabel ? {getPriceString(productPrices[0])}
:
{getPriceString(productPrices[0])}
)
: null;
}