<script setup>
import TButton from "@/components/ui/TButton.vue";

const props = defineProps({
	primary: {
		type: Boolean,
		default: false
	},
	actionCreate: {
		type: Boolean,
		default: false
	},
	actionReload: {
		type: Boolean,
		default: false
	},
	actionDelete: {
		type: Boolean,
		default: false
	},
	actionStop: {
		type: Boolean,
		default: false
	},
	actionPlay: {
		type: Boolean,
		default: false
	},
	danger: {
		type: Boolean,
		default: false
	},
	small: {
		type: Boolean,
		default: false
	},
	icon: {
		type: String
	}
})
</script>

<template>
	<TButton :outlined="!primary" :danger="danger" :size="small ? 'small' : null">
		<i v-if="actionCreate" class="pi pi-pen-to-square" :class="{small: small}"></i>
		<i v-if="actionReload" class="pi pi-refresh" :class="{small: small}"></i>
		<i v-if="actionDelete" class="pi pi-trash" :class="{small: small}"></i>
		<i v-if="actionStop" class="pi pi-stop" :class="{small: small}"></i>
		<i v-if="actionPlay" class="pi pi-play" :class="{small: small}"></i>
		<i v-if="icon" :class="{[icon]:true, small: small}"></i>
		<slot></slot>
	</TButton>
</template>

<style scoped lang="postcss">

</style>