import 'package:electronic_assistant/dialog/add_agenda_dialog.dart';
import 'package:electronic_assistant/resource/assets.gen.dart';
import 'package:electronic_assistant/resource/colors.gen.dart';
import 'package:electronic_assistant/resource/string.gen.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:get/get.dart';

void talkAddTemplatePopup(BuildContext context) {
  SmartDialog.showAttach(
    targetContext: context,
    targetBuilder: (targetOffset, targetSize) =>
        targetOffset + const Offset(20, 6),
    animationType: SmartAnimationType.fade,
    alignment: Alignment.bottomLeft,
    keepSingle: true,
    usePenetrate: true,
    maskColor: Colors.transparent,
    clickMaskDismiss: true,
    builder: (_) {
      return Column(
        children: [
          SizedBox(
            width: 146.w,
            child: Align(
              alignment: const Alignment(0.4, 0),
              child:
                  Assets.images.iconTriangular.image(width: 18.w, height: 8.w),
            ),
          ),
          Container(
            height: 58.h,
            width: 146.w,
            decoration: BoxDecoration(
              color: ColorName.colorPrimary,
              borderRadius: BorderRadius.circular(8.w),
            ),
            child: Center(
              child: Text(
                StringName.talkTemplateAddPopupContentTxt.tr,
                style: TextStyle(fontSize: 14.sp, color: Colors.white),
              ),
            ),
          )
        ],
      );
    },
  );
}
