<script lang="ts">
  import type {NodeViewProps} from "@tiptap/core"
  import {NodeViewWrapper} from "svelte-tiptap"

  export let node: NodeViewProps["node"]
  export let selected: NodeViewProps["selected"]
</script>

<NodeViewWrapper as="span">
  <button class="tiptap-object {selected ? 'tiptap-active' : ''}">
    @{node.attrs.bech32.slice(0, 16)}...
  </button>
</NodeViewWrapper>
