<template>
  <button
    v-if="dados?.acao"
    type="button"
    class="eli-tabela__celula-link"
    @click.stop.prevent="dados.acao()"
  >
    {{ dados?.texto }}
  </button>
  <span v-else>{{ dados?.texto }}</span>
</template>

<script lang="ts">
import { defineComponent, PropType } from "vue"
import type { tiposTabelaCelulas } from "./tiposTabelaCelulas";

export default defineComponent({
  name: "EliTabelaCelulaTextoSimples",
  components: {},
  props: {
    dados: {
      type: Object as PropType<tiposTabelaCelulas["textoSimples"]>,
    },
  },
  data() {
    return {
    }
  },
  methods: {

  },
  setup({ dados }) {
    return { dados }
  },
})
</script>

<style scoped>
.eli-tabela__celula-link {
  all: unset;
  display: inline;
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.55);
  text-underline-offset: 2px;
}

.eli-tabela__celula-link:hover {
  color: #1d4ed8;
  text-decoration-color: rgba(29, 78, 216, 0.75);
}

.eli-tabela__celula-link:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
  border-radius: 4px;
}
</style>
