// Resources hub seed — documents library + meetings/workshops calendar.
// Demo file payloads are small text placeholders so downloads work in the prototype.
window.CTSC_SEED = window.CTSC_SEED || {};

function __doc(title) {
  return 'data:text/plain;charset=utf-8,' + encodeURIComponent(
    'CAPE TOWN SPORT COUNCIL\n\n' + title + '\n\n' +
    'This is a sample document placeholder used in the prototype. ' +
    'When an administrator uploads a real PDF or Word file, the actual document is stored and made available here for federations to download.');
}

window.CTSC_SEED.DOCUMENTS = [
  { id: 'doc_const1', title: 'CTSC Constitution (2024 revision)', category: 'Constitution', ext: 'PDF', size: '480 KB', fedId: null, date: '2024-11-18', note: 'Adopted at the 2024 Annual General Meeting. Governs all affiliated federations.', status: 'Published', data: __doc('Constitution 2024') },
  { id: 'doc_notice1', title: 'Notice: Quarterly Council Meeting — Q3 2026', category: 'Meeting Notice', ext: 'PDF', size: '120 KB', fedId: null, date: '2026-06-02', note: 'Formal notice to all affiliated federations. Quorum required.', status: 'Published', data: __doc('Q3 Council Meeting Notice') },
  { id: 'doc_agenda1', title: 'Agenda — Quarterly Council Meeting, June 2026', category: 'Agenda', ext: 'PDF', size: '96 KB', fedId: null, date: '2026-06-05', note: 'Includes Colours Commission report and transformation tabling.', status: 'Published', data: __doc('June 2026 Council Agenda') },
  { id: 'doc_min1', title: 'Minutes — Council Meeting, March 2026', category: 'Minutes', ext: 'PDF', size: '210 KB', fedId: null, date: '2026-03-28', note: 'Confirmed minutes of the Q1 quarterly meeting.', status: 'Published', data: __doc('March 2026 Minutes') },
  { id: 'doc_corr1', title: 'Correspondence — SASCOC alignment circular', category: 'Correspondence', ext: 'PDF', size: '88 KB', fedId: null, date: '2026-05-14', note: 'Circular received from SASCOC regarding affiliation pathways.', status: 'Published', data: __doc('SASCOC Circular') },
  { id: 'doc_pol1', title: 'Safeguarding Policy & Code of Conduct', category: 'Policy', ext: 'PDF', size: '340 KB', fedId: null, date: '2026-02-10', note: 'Mandatory for all member federations and their clubs.', status: 'Published', data: __doc('Safeguarding Policy') },
  { id: 'doc_pol2', title: 'Colours Commission — Issuing Policy', category: 'Policy', ext: 'PDF', size: '150 KB', fedId: null, date: '2026-04-02', note: 'Criteria and process for the award of District colours.', status: 'Published', data: __doc('Colours Issuing Policy') },
  { id: 'doc_corr2', title: 'Correspondence — Athlone Precinct facility booking', category: 'Correspondence', ext: 'DOCX', size: '64 KB', fedId: 'wprfu', date: '2026-05-22', note: 'Addressed to WP Rugby Football Union.', status: 'Published', data: __doc('Facility Booking Letter') },
  { id: 'doc_notice2', title: 'Notice: Transformation reporting deadline', category: 'Meeting Notice', ext: 'PDF', size: '72 KB', fedId: null, date: '2026-05-30', note: 'All federations to submit Q2 representation figures.', status: 'Published', data: __doc('Transformation Deadline Notice') },
  { id: 'doc_agenda2', title: 'Agenda — Coaching Commission workshop', category: 'Agenda', ext: 'PDF', size: '58 KB', fedId: null, date: '2026-06-08', note: 'Running order for the June coaching development workshop.', status: 'Published', data: __doc('Coaching Workshop Agenda') },
];

window.CTSC_SEED.CALENDAR = [
  { id: 'cal_1', title: 'Quarterly Council Meeting (Q3)', type: 'Meeting', date: '2026-06-19', time: '18:00', end: '20:00', venue: 'Athlone Sports Precinct — Boardroom', fedId: null, desc: 'Standing quarterly meeting of all affiliated federations.' },
  { id: 'cal_2', title: 'Coaching Development Workshop', type: 'Workshop', date: '2026-06-13', time: '09:00', end: '14:00', venue: 'Athlone Sports Precinct — Hall B', fedId: null, desc: 'Level 1 & 2 coaching modules with the Coaching Commission.' },
  { id: 'cal_3', title: 'Safeguarding Workshop', type: 'Workshop', date: '2026-06-27', time: '10:00', end: '13:00', venue: 'Online (Zoom)', fedId: null, desc: 'Child protection and code-of-conduct training for federation officers.' },
  { id: 'cal_4', title: 'Transformation reporting deadline', type: 'Deadline', date: '2026-06-30', time: '', end: '', venue: '', fedId: null, desc: 'Q2 representation figures due from all federations.' },
  { id: 'cal_5', title: 'Exco Meeting', type: 'Meeting', date: '2026-06-11', time: '17:30', end: '19:00', venue: 'Athlone Sports Precinct — Boardroom', fedId: null, desc: 'Executive committee monthly sitting.' },
  { id: 'cal_6', title: 'Women & Girls Commission Workshop', type: 'Workshop', date: '2026-07-05', time: '09:30', end: '12:30', venue: 'Athlone Sports Precinct — Hall A', fedId: null, desc: 'Programme planning for the 2026/27 season.' },
  { id: 'cal_7', title: 'Rural Sport Indaba', type: 'Workshop', date: '2026-07-18', time: '08:30', end: '15:00', venue: 'Khayelitsha Sports Complex', fedId: null, desc: 'Development planning for rural and township codes.' },
  { id: 'cal_8', title: 'Quarterly Council Meeting (Q4)', type: 'Meeting', date: '2026-09-18', time: '18:00', end: '20:00', venue: 'Athlone Sports Precinct — Boardroom', fedId: null, desc: 'Standing quarterly meeting of all affiliated federations.' },
  { id: 'cal_9', title: 'Annual General Meeting', type: 'AGM', date: '2026-11-21', time: '10:00', end: '14:00', venue: 'Good Hope Centre', fedId: null, desc: 'Annual general meeting — office-bearer elections and financial report.' },
  { id: 'cal_10', title: 'Finance Sub-committee', type: 'Meeting', date: '2026-06-24', time: '16:00', end: '17:30', venue: 'Online (Zoom)', fedId: null, desc: 'Treasury review ahead of the quarterly meeting.' },
];
