import type { ComponentInterface, EventEmitter } from '@stencil/core'; import { Component, Element, Event, Host, Method, Prop, h } from '@stencil/core'; import { isEndSide } from '@utils/helpers'; import { getIonMode } from '../../global/ionic-global'; import type { Side } from '../menu/menu-interface'; @Component({ tag: 'ion-item-options', styleUrls: { ios: 'item-options.ios.scss', md: 'item-options.md.scss', }, }) export class ItemOptions implements ComponentInterface { @Element() el!: HTMLElement; /** * The side the option button should be on. Possible values: `"start"` and `"end"`. If you have multiple `ion-item-options`, a side must be provided for each. * */ @Prop() side: Side = 'end'; /** * Emitted when the item has been fully swiped. */ @Event() ionSwipe!: EventEmitter; // TODO(FW-2832): type /** @internal */ @Method() async fireSwipeEvent() { this.ionSwipe.emit({ side: this.side, }); } render() { const mode = getIonMode(this); const isEnd = isEndSide(this.side); return ( ); } }