import type { TirthaEntry, TirthaSloka } from './types.js'

// The Sapta Purī — the seven mokṣa-giving holy cities of the
// "Ayodhyā Mathurā Māyā…" śloka (attributed to the Garuḍa Purāṇa). Kashi and
// Dwarka recur in other lists; their Sapta-Purī records take distinct ids
// (`kashi-puri`, `dwarka-puri`) from the jyotirliṅga `kashi-vishwanath` and the
// Char-Dhām `dwarka`. Verified across Wikipedia (Sapta Purī, en + hi) +
// greenmesg (the śloka).

export const SAPTA_PURI: readonly TirthaEntry[] = [
  {
    id: 'ayodhya',
    category: 'sapta-puri',
    name: { en: 'Ayodhya', hi: 'अयोध्या' },
    nameSanskrit: 'अयोध्या',
    location: { en: 'Ayodhya', hi: 'अयोध्या' },
    state: { en: 'Uttar Pradesh', hi: 'उत्तर प्रदेश' },
    deity: 'rama',
    significance: {
      en: 'The birthplace of Śrī Rāma, on the Sarayū river.',
      hi: 'श्री राम की जन्मभूमि, सरयू नदी के तट पर।',
    },
  },
  {
    id: 'mathura',
    category: 'sapta-puri',
    name: { en: 'Mathura', hi: 'मथुरा' },
    nameSanskrit: 'मथुरा',
    location: { en: 'Mathura', hi: 'मथुरा' },
    state: { en: 'Uttar Pradesh', hi: 'उत्तर प्रदेश' },
    deity: 'krishna',
    significance: {
      en: 'The birthplace of Śrī Krishna, on the Yamunā river.',
      hi: 'श्री कृष्ण की जन्मभूमि, यमुना नदी के तट पर।',
    },
  },
  {
    id: 'haridwar',
    category: 'sapta-puri',
    name: { en: 'Haridwar (Māyā)', hi: 'हरिद्वार (माया)' },
    nameSanskrit: 'मायापुरी',
    location: { en: 'Haridwar', hi: 'हरिद्वार' },
    state: { en: 'Uttarakhand', hi: 'उत्तराखंड' },
    deity: null,
    significance: {
      en: 'Māyāpurī — the gateway where the Ganga descends from the hills to the plains; a major site of the Kumbh Melā.',
      hi: 'मायापुरी — वह द्वार जहाँ गंगा पर्वतों से उतरकर मैदानों में प्रवेश करती है; कुम्भ मेले का प्रमुख स्थल।',
    },
  },
  {
    id: 'kashi-puri',
    category: 'sapta-puri',
    name: { en: 'Kashi (Varanasi)', hi: 'काशी (वाराणसी)' },
    nameSanskrit: 'काशी',
    location: { en: 'Varanasi', hi: 'वाराणसी' },
    state: { en: 'Uttar Pradesh', hi: 'उत्तर प्रदेश' },
    deity: 'shiva',
    significance: {
      en: 'The city of Śiva on the Ganga, where death is said to grant liberation; also home to the Kashi Vishwanath jyotirliṅga.',
      hi: 'गंगा-तट पर शिव की नगरी, जहाँ मृत्यु मोक्षदायिनी मानी जाती है; काशी विश्वनाथ ज्योतिर्लिंग का स्थान भी।',
    },
    pujaSlug: 'rudrabhishek',
  },
  {
    id: 'kanchi',
    category: 'sapta-puri',
    name: { en: 'Kanchi (Kanchipuram)', hi: 'कांची (कांचीपुरम)' },
    nameSanskrit: 'काञ्ची',
    location: { en: 'Kanchipuram', hi: 'कांचीपुरम' },
    state: { en: 'Tamil Nadu', hi: 'तमिलनाडु' },
    deity: 'parvati',
    significance: {
      en: 'The only Sapta Purī sacred to both Śiva and Viṣṇu, with the goddess Kāmākṣī at its heart; "Kāñcī" of the famous śloka.',
      hi: 'एकमात्र सप्त पुरी जो शिव एवं विष्णु दोनों को समर्पित है, जिसके केंद्र में देवी कामाक्षी हैं; प्रसिद्ध श्लोक की "काञ्ची"।',
    },
  },
  {
    id: 'avantika',
    category: 'sapta-puri',
    name: { en: 'Avantika (Ujjain)', hi: 'अवंतिका (उज्जैन)' },
    nameSanskrit: 'अवन्तिका',
    location: { en: 'Ujjain', hi: 'उज्जैन' },
    state: { en: 'Madhya Pradesh', hi: 'मध्य प्रदेश' },
    deity: 'shiva',
    significance: {
      en: 'Ancient Avantikā on the Kṣiprā river, home of the Mahākāleśvara jyotirliṅga; a major Kumbh Melā site.',
      hi: 'क्षिप्रा नदी के तट पर प्राचीन अवन्तिका, महाकालेश्वर ज्योतिर्लिंग का स्थान; कुम्भ मेले का प्रमुख स्थल।',
    },
    pujaSlug: 'rudrabhishek',
  },
  {
    id: 'dwarka-puri',
    category: 'sapta-puri',
    name: { en: 'Dwarka (Dvārāvatī)', hi: 'द्वारका (द्वारावती)' },
    nameSanskrit: 'द्वारावती',
    location: { en: 'Dwarka', hi: 'द्वारका' },
    state: { en: 'Gujarat', hi: 'गुजरात' },
    deity: 'krishna',
    significance: {
      en: 'Krishna’s sea-coast capital Dvārāvatī, worshipped as Dwārkādhīśa; also one of the four pan-India Char Dhām.',
      hi: 'कृष्ण की सागर-तटीय राजधानी द्वारावती, द्वारकाधीश रूप में पूजित; चार धाम में से एक भी।',
    },
  },
]

/**
 * The Sapta-Purī śloka (Garuḍa Purāṇa). `iast` is machine-generated from the
 * Devanagari and round-trip-verified. The first hemistich is identical across
 * sources; the closing pāda also circulates in a masculine variant
 * (सप्तैते … मोक्षदायकाः) — the feminine form is shipped (the purīs are
 * grammatically feminine). See SOURCES.md.
 */
export const SAPTA_PURI_SLOKA: TirthaSloka = {
  devanagari: `अयोध्या मथुरा माया काशी काञ्ची अवन्तिका ।
पुरी द्वारावती चैव सप्तैता मोक्षदायिकाः ॥`,
  iast: `ayodhyā mathurā māyā kāśī kāñcī avantikā |
purī dvārāvatī caiva saptaitā mokṣadāyikāḥ ||`,
}
