"use client"; import { ActionButton, type ActionButtonProps, } from "@suphark/ui/components/shared/button/base/action-button"; import { useUiText } from "@suphark/ui/components/shared/ui-text"; import type * as React from "react"; import { ActionDelete } from "../semantic-icons"; interface DeleteButtonProps extends ActionButtonProps { label?: React.ReactNode; loadingLabel?: React.ReactNode; } export function DeleteButton({ children, icon, isLoading, label, loadingLabel, type = "button", variant = "destructive", ...props }: DeleteButtonProps) { const text = useUiText().buttons; return ( } isLoading={isLoading} {...props} > {children ?? (isLoading ? (loadingLabel ?? text?.deleting ?? "กำลังลบ...") : (label ?? text?.delete ?? "ลบ"))} ); }