/**
 * Copyright (c) 2023-present Plane Software, Inc. and contributors
 * SPDX-License-Identifier: AGPL-3.0-only
 * See the LICENSE file for details.
 */

import { CheckCircle2, Minus, MinusCircle } from "lucide-react";
import type { EProductSubscriptionEnum } from "@plane/types";
// plane imports
// constants
import type { TPlanFeatureData } from "@/constants/plans";

type TPlanFeatureDetailProps = {
  subscriptionType: EProductSubscriptionEnum;
  data: TPlanFeatureData;
};

export function PlanFeatureDetail(props: TPlanFeatureDetailProps) {
  const { data } = props;

  if (data === null || data === undefined) {
    return <Minus className="size-4 text-placeholder" />;
  }
  if (data === true) {
    return <CheckCircle2 className="size-4 text-accent-primary" />;
  }
  if (data === false) {
    return <MinusCircle className="size-4 text-placeholder" />;
  }
  return <>{data}</>;
}
