/**
* GnScheduledCampaignCard — scheduled campaign summary card.
*
* Figma: Card - Scheduled Campaign.
*/
import { defineComponent, h } from "vue";
import { cx } from "../utils.js";
export default defineComponent({
name: "GnScheduledCampaignCard",
inheritAttrs: false,
props: {
title: { type: String, required: true },
status: { type: String, default: "scheduled" }, // scheduled | sent | draft
meta: { type: Array, default: () => [] } // e.g. ["Email", "All subscribers"]
},
setup(props, { attrs, slots }) {
return () => {
const metaText = slots.meta?.()
? null
: (props.meta || []).filter(Boolean).join(" • ");
return h("article", {
...attrs,
class: cx(
"scheduled-campaign-card",
`scheduled-campaign-card--${props.status}`,
attrs.class
)
}, [
h("h3", { class: "scheduled-campaign-card__title" }, slots.title?.() || props.title),
(metaText || slots.meta) && h("p", { class: "scheduled-campaign-card__meta" }, slots.meta?.() || metaText)
]);
};
}
});