/*!
 * Built by ShiftSoftware
 * Copyright (c)
 */
import { h } from "@stencil/core";
import SuccessIcon from "~assets/check.svg";
import RejectIcon from "~assets/x-mark.svg";
import cn from "../../../global/lib/cn";
export default function StatusCard({ isLoading = false, opened = true, desc, className, fromDesc, toDesc, from, to, state = 'idle', icon = true }) {
    return (h("flexible-container", { isOpened: opened, classes: cn('shift-skeleton', { loading: isLoading || !opened }) }, h("div", { class: cn('card', className, `${state}-card`) }, icon && state === 'reject' && h("img", { src: RejectIcon }), icon && state === 'warning' && h("img", { src: RejectIcon }), icon && state === 'success' && h("img", { src: SuccessIcon }), from && (h("p", { class: "no-padding flex gap-2" }, h("span", { class: "font-semibold" }, fromDesc, ":"), " ", desc)), to && (h("p", { class: "no-padding flex gap-2" }, h("span", { class: "font-semibold" }, toDesc, ":"), " ", desc)), !from && !to && h("p", { class: state === 'idle' ? 'no-padding' : '' }, desc))));
}
