<svelte:options customElement={{ props: {} }} />

<script lang="ts">

  import type {MyHTMLButtonAttributes} from './types';
  import type {Snippet} from 'svelte';

  const {
    children,
    primary,
    onclick,
    class: className = '',
    style = '',
    ...rest
  }: Omit<MyHTMLButtonAttributes, 'class' | 'style'> & {
    children?: Snippet;
    primary?: boolean;
    class?: string;
    style?: string;
  } = $props();
</script>
<button
    type="button"
    {...rest}
    onclick={onclick}
    {style}
    class="tf-btn {primary?'tf-btn-primary':''} nopan nodrag {className}"
>
    {@render children?.()}
</button>
