<template>
    <DocSectionText v-bind="$attrs">
        <p>Icons and Labels can be customized using <i>onLabel</i>, <i>offLabel</i>, <i>onIcon</i> and <i>offIcon</i> properties.</p>
    </DocSectionText>
    <div class="card flex justify-content-center">
        <ToggleButton v-model="checked" onLabel="I confirm" offLabel="I reject" onIcon="pi pi-check" offIcon="pi pi-times" class="w-9rem" aria-label="do you confirm" />
    </div>
    <DocSectionCode :code="code" />
</template>

<script>
export default {
    data() {
        return {
            checked: false,
            code: {
                basic: `
<ToggleButton v-model="checked1" onLabel="I confirm" offLabel="I reject"
    onIcon="pi pi-check" offIcon="pi pi-times" class="w-9rem" />`,
                options: `
<template>
    <div class="card flex justify-content-center">
        <ToggleButton v-model="checked" onLabel="I confirm" offLabel="I reject"
            onIcon="pi pi-check" offIcon="pi pi-times" class="w-9rem" />
    </div>
</template>

<script>
export default {
    data() {
        return {
            checked: false
        }
    }
};
<\/script>`,
                composition: `
<template>
    <div class="card flex justify-content-center">
        <ToggleButton v-model="checked" onLabel="I confirm" offLabel="I reject"
            onIcon="pi pi-check" offIcon="pi pi-times" class="w-9rem" />
    </div>
</template>

<script setup>
import { ref } from 'vue';

const checked = ref(false);
<\/script>`
            }
        };
    }
};
</script>
