import 'package:flutter/material.dart';
import 'package:skillconnect_app/features/admin/tabs/marketing/widgets/marketing_ui.dart';
import 'marketing_page_common.dart';
class MarketingServiceCentersPage extends StatelessWidget {
 const MarketingServiceCentersPage({super.key,required this.centers,required this.onAdd}); final List<Map<String,dynamic>> centers; final VoidCallback onAdd;
 @override Widget build(BuildContext context)=>MarketingPageFrame(title:'Service Centers',subtitle:'Centers are assigned to campuses from the university database',icon:Icons.storefront_outlined,actionText:'Add center',onAction:onAdd,children:[if(centers.isEmpty)const MarketingEmptyState(text:'No service centers yet. Add a center and choose its campus.')else ...centers.map((r)=>Padding(padding:const EdgeInsets.only(bottom:8),child:marketingRecord(icon:Icons.location_city_outlined,title:'${r['center_name']}',detail:'${r['campus_name']} • ${r['center_code']}${(r['location']??'').toString().isEmpty?'':' • ${r['location']}'}',tag:(r['is_active']==true||r['is_active']=='t')?'ACTIVE':'INACTIVE')))]);
}
