/** * Copyright (c) 2023-present Plane Software, Inc. and contributors * SPDX-License-Identifier: AGPL-3.0-only * See the LICENSE file for details. */ import React from "react"; import { Button } from "../button/button"; import { cn } from "../utils/classname"; import { getCompactAsset } from "./assets/asset-registry"; import type { CompactAssetType } from "./assets/asset-types"; import type { BaseEmptyStateCommonProps } from "./types"; export function EmptyStateCompact({ asset, assetKey, title, description, actions, className, rootClassName, assetClassName, align = "center", customButton, }: BaseEmptyStateCommonProps) { // Determine which asset to use: assetKey takes precedence, fallback to custom asset const resolvedAsset = assetKey ? getCompactAsset(assetKey as CompactAssetType, assetClassName) : asset; const rootAlignClasses = align === "center" ? "items-center" : "items-start"; const containerAlignClasses = align === "center" ? "items-center text-center" : "items-start text-left"; return (
{description}
}{title}
)} {customButton ? customButton : actions && actions.length > 0 && (