// Silence may be golden, but sometimes words paint the canvas of understanding.
const LinksySearchAndReplaceTableHeader = {
	name: 'LinksySearchAndReplaceTableHeader',
	props: {
		headerName: {
			type: String,
			default: 'Page',
		},
		isAllRowsSelected: {
			type: Function,
			default: () => {},
		},
		selectAllRows: {
			type: Function,
			default: () => {},
		},
		pagination: {
			type: Object,
			required: true,
		},
		disabled: {
			type: Boolean,
			default: false
		}
	},
	components: {
		LinksySearch,
		LinksyDropdown,
	},
	template: `
    <div class="d-flex align-items-center w-100">
        <div
            class="linksy-checkbox me-3" 
            :class="{'checked': isAllRowsSelected, 'is-disabled': disabled}"
            @click="selectAllRows"
        ></div>
        <div class="d-flex flex-column flex-md-row gap-2 justify-content-between align-items-center w-100">
            <span>
                {{ headerName }} <span class="fs-20px linksy-item-count" v-if="!isLoading">{{pagination.total}}</span>
            </span>
        </div>
    </div>
    `,
}
