import 'dart:ui';

import 'package:electronic_assistant/popup/template_utils.dart';
import 'package:electronic_assistant/resource/string.gen.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';
import 'common_popup.dart';

void showTalkPopup(Offset offset, Alignment alignment,
    {VoidCallback? onRename, VoidCallback? onDelete}) {
  showPressTouchPopup(offset, alignment, [
    createNormalPopupItem(StringName.talkRename.tr, onItemClick: () {
      SmartDialog.dismiss();
      onRename?.call();
    }),
    createPopupDivider(),
    createDeletePopupItem(() {
      SmartDialog.dismiss();
      onDelete?.call();
    }),
  ]);
}
