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

// pi dash imports
import { cn } from "@pi-dash/ui";

type Props = {
  className?: string;
  control?: React.ReactNode;
  description?: React.ReactNode;
  title?: React.ReactNode;
};

export function ProfileSettingsHeading({ className, control, description, title }: Props) {
  return (
    <div className={cn("flex flex-col items-start justify-between gap-4 md:flex-row md:items-center", className)}>
      <div className="flex flex-col items-start gap-1">
        {title && <h6 className="text-h6-medium text-primary">{title}</h6>}
        {description && <p className="text-body-xs-regular text-tertiary">{description}</p>}
      </div>
      {control}
    </div>
  );
}
