// Template "fragment": dois nós de topo (o slot vazio e o card) — o glacier-ui
// (0.4.12+) embrulha múltiplas raízes num Fragment e aplica os filhos no pai,
// then o par if/else vira dois irmãos do grid, sem nó wrapper.
component {
props {
prop(name = id)
prop(name = name)
prop(name = service_count)
prop(name = running_count)
prop(name = description)
prop(name = can_delete)
prop(name = filler)
}
if @filler == "1" {
column(class = u-fill)
} else {
column(class = card) {
row(class = card__head) {
text("@name", class = card__name)
}
text(
"{t('project_card.service_s_running', service_count=service_count, running_count=running_count)}",
class = u-muted,
size = 11,
)
text("@description", class = u-muted)
hr
// Ações empilhadas: um botão fill disputando a linha com
// texto/botão fica torto quando o card está estreito.
button(class = "card__action card__action--open", on_click = open_project:@id, disabled = @busy_open_project, text = "{t('common.open')}")
button(
class = "card__action card__action--danger",
if = @can_delete,
equals = 1,
on_click = delete_project:@id,
disabled = @busy_delete_project,
text = "{t('common.remove')}",
)
text(
"{t('project_card.cannot_be_removed_it_has')}",
class = u-muted,
if = @can_delete,
not_equals = 1,
)
}
}
}