<template>
  <SpaceButton
    class="next blue"
    @click="emitClick"
    :loading="loading"
    :disabled="disabled"
  >
    <span>
      <slot />
    </span>
    <div class="icon">
      <SpIcon name="sp-arrow-right" />
    </div>
  </SpaceButton>
</template>
<script lang="ts">
import { defineComponent } from "vue";
export default defineComponent({
  props: {
    loading: {
      default: false,
      type: Boolean,
    },
    disabled: {
      default: false,
      type: Boolean,
    },
  },
  setup({ loading, disabled }, { emit }) {
    const emitClick = (): void => {
      emit("click");
    };

    return {
      emitClick,
      loading,
      disabled,
    };
  },
});
</script>
