import 'package:hmg_patient_app/core/viewModels/pharmacyModule/wishlist_view_model.dart';
import 'package:hmg_patient_app/pages/base/base_view.dart';
import 'package:hmg_patient_app/pages/pharmacies/ProductCheckTypeWidget.dart';
import 'package:hmg_patient_app/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:hmg_patient_app/widgets/others/app_scaffold_widget.dart';

class WishlistPage extends StatelessWidget {
  const WishlistPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return BaseView<WishListViewModel>(
      onModelReady: (model) => model.getWishlistData(),
      builder: (_, model, wi) => AppScaffold(
        appBarTitle: TranslationBase.of(context).wishlist,
        isShowAppBar: true,
        isShowDecPage: false,
        isPharmacy: true,
        showPharmacyCart: false,
        showHomeAppBarIcon: false,
        isBottomBar: true,
        baseViewModel: model,
        body: model.wishListList.length == 0
            ? Container(
          child: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Padding(
                  padding: const EdgeInsets.all(8.0),
                  child: Image.asset(
                    'assets/images/new-design/empty_box.png',
                    width: 100,
                    height: 100,
                    fit: BoxFit.cover,
                  ),
                ),
                Padding(
                  padding: const EdgeInsets.all(8.0),
                  child: Text(TranslationBase.of(context).noData,
                   // 'There is no data',
                    style: TextStyle(fontSize: 30),
                  ),
                )
              ],
            ),
          ),
        )
            : Container(
          child: Column(
            children: [
              Expanded(
                flex: 20,
                child: Container(
                  width: double.infinity,
                  height: MediaQuery.of(context).size.height * 0.85, //250,
                  child: ProductCheckTypeWidget(model: model,),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

