"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 { ActionSave } from "../semantic-icons"; interface SaveButtonProps extends ActionButtonProps { label?: React.ReactNode; loadingLabel?: React.ReactNode; } export function SaveButton({ children, icon, isLoading, label, loadingLabel, type = "submit", ...props }: SaveButtonProps) { const text = useUiText(); return ( } isLoading={isLoading} {...props}> {children ?? (isLoading ? (loadingLabel ?? text.buttons?.saving ?? "กำลังบันทึก...") : (label ?? text.save))} ); }