/** * Copyright (c) 2023-present Plane Software, Inc. and contributors * SPDX-License-Identifier: AGPL-3.0-only * See the LICENSE file for details. */ // local imports import { Button } from "../button/button"; import { cn } from "../utils/classname"; import { getDetailedAsset } from "./assets/asset-registry"; import type { DetailedAssetType } from "./assets/asset-types"; import type { BaseEmptyStateCommonProps } from "./types"; export function EmptyStateDetailed({ asset, assetKey, title, description, actions, className, rootClassName, assetClassName, customButton, align = "start", }: BaseEmptyStateCommonProps) { // Determine which asset to use: assetKey takes precedence, fallback to custom asset const resolvedAsset = assetKey ? getDetailedAsset(assetKey as DetailedAssetType, assetClassName) : asset; return (
{resolvedAsset &&
{resolvedAsset}
}
{(title || description) && (
{title &&

{title}

} {description &&

{description}

}
)} {customButton ? customButton : actions && actions.length > 0 && (
{actions.map((action, index) => { const { label, variant, ...rest } = action; return ( ); })}
)}
); } EmptyStateDetailed.displayName = "EmptyStateDetailed";