from fasthtml.components import *

from myfasthtml.core.commands import Command


def mk_button(element, command: Command = None, **kwargs):
  if command is None:
    return Button(element, **kwargs)
  
  htmx = command.get_htmx_params()
  return Button(element, **htmx, **kwargs)
