import 'package:bloc/bloc.dart';
import 'package:e_commerce_training/src/model/response/buy_later_response.dart';
import 'package:equatable/equatable.dart';
import 'package:meta/meta.dart';

part 'buy_later_state.dart';

class BuyLaterCubit extends Cubit<BuyLaterState> {
  BuyLaterCubit() : super(BuyLaterInitial());
  List<BuyLateResponse> listBuy=[];
  int index = 0;
  int rating  = 1;
   void addBuyLater(){
     listBuy.add(
         BuyLateResponse(
             id: 1,
             name: "Mua sau",
             listBuyLater: [
               ListBuyLater(
                   id: 1,
                   thumb: "https://cdn.chiaki.vn/unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2021/09/tay-da-chet-da-mun-ktimi-2-bha-salicylic-acid-6131ab87a18bc-03092021115847.png",
                   title: "Tẩy Da Chết Da Mụn Ktimi 2% BHA Salicylic Acid",
                   manufacturer: "Canada",
                   price: "70000",
                   evaluate: "(20)"
               ),
               ListBuyLater(
                   id: 2,
                   thumb: "https://cdn.chiaki.vn/unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2017/10/natrol-biotin-10000-mcg-ho-tro-moc-toc-giup-mong-khoe-59eac1f7e284a-21102017104143.jpg",
                   title: "Viên Uống Mọc Tóc Natrol Biotin 10000 Mcg Của Mỹ 100 Viên",
                   manufacturer: "Mỹ",
                   price: "90000",
                   evaluate: "(10)"
               ),
               ListBuyLater(
                   id: 3,
                   thumb: "https://cdn.chiaki.vn/unsafe/0x900/left/top/smart/filters:quality(90)/https://chiaki.vn/upload/product/2020/07/tao-xoan-spirulina-nhat-ban-hop-2200-vien-5efbfbee0f82e-01072020095854.jpg",
                   title: "Tảo Xoắn Spirulina Nhật Bản Hộp 2200 Viên, Mác đỏ",
                   manufacturer: "VietNam",
                   price: "100000",
                   evaluate: "(30)"
               )
             ]
         )
     );

   }
}

