UNPKG

@empathyco/x-components

Version:
48 lines (45 loc) 1.4 kB
import { defineComponent, computed } from 'vue'; import BaseEventButton from '../../../components/base-event-button.vue.js'; import { historyQueriesXModule } from '../x-module.js'; /** * Button that when it is pressed emits the * {@link HistoryQueriesXEvents.UserPressedRemoveHistoryQuery} event, expressing the user * intention to remove a query in the history. * * @public */ var _sfc_main = defineComponent({ name: 'RemoveHistoryQuery', xModule: historyQueriesXModule.name, components: { BaseEventButton, }, props: { /** * The historyQuery that will be removed when clicking the clear button. * * @public */ historyQuery: { type: Object, required: true, }, }, setup(props) { /** * The event handler that will be triggered when clicking on the clear history query button. * * @remarks * {@link HistoryQueriesXEvents.UserPressedRemoveHistoryQuery}: historyQuery * * @returns The {@link XEvent} to emit. * @public */ const removeHistoryQueryEvent = computed(() => ({ UserPressedRemoveHistoryQuery: props.historyQuery })); return { removeHistoryQueryEvent, }; }, }); export { _sfc_main as default }; //# sourceMappingURL=remove-history-query.vue2.js.map