<script setup lang="ts">
defineProps<{
    url: string;
    small?: boolean;
}>();

const onlyFirst = ref(true);
</script>

<template>
    <div>
        <ClipboardLinkButton :link="url + (onlyFirst ? '?only_first_days' : '')" :class="small ? 'btn-sm' : ''" />
        <a :href="url + (onlyFirst ? '?only_first_days' : '')" :class="['btn', 'btn-outline-primary', 'm-1', small ? 'btn-sm' : '']">
            <Icon v="calendar-plus" />
            <T :params="{ name: '.ics' }">crud.download</T>
        </a>

        <div class="form-check form-switch small">
            <label>
                <input v-model="onlyFirst" class="form-check-input" type="checkbox" role="switch">
                <T>calendar.onlyFirstDays</T>
            </label>
        </div>
    </div>
</template>
