import { h, Component } from 'preact'; import ActionEdit from './action_edit.js'; export default class Action extends Component { constructor() { super(); this.onDelete = this.onDelete.bind(this); } onDelete() { // eslint-disable-next-line if (confirm(this.props.localize('ui.panel.config.automation.editor.actions.delete_confirm'))) { this.props.onChange(this.props.index, null); } } render(props) { return (
{props.localize('ui.panel.config.automation.editor.actions.duplicate')} {props.localize('ui.panel.config.automation.editor.actions.delete')}
); } }