// Content for the /legal pages. Plain data so the layout, footer and page share one list.

export type LegalSection = {
  heading: string
  body?: string[]
  points?: string[]
}

export type LegalDoc = {
  slug: 'terms' | 'privacy' | 'acceptable-use' | 'security' | 'cookies'
  label: string
  title: string
  summary: string
  sections: LegalSection[]
}

export const LEGAL_UPDATED = '24 October 2026'

export const LEGAL_DOCS: LegalDoc[] = [
  {
    slug: 'terms',
    label: 'Terms',
    title: 'Terms of service',
    summary: 'The agreement between you and AkotoCreative SMS when you create an account, buy credit or send messages.',
    sections: [
      {
        heading: 'Who we are',
        body: [
          'AkotoCreative SMS ("we", "us") is a bulk SMS service for Ghana. We let you buy SMS credit and send text messages to Ghanaian mobile numbers from our website or through our API. Payments and message delivery are handled by our partner Moolre.',
          'By creating an account or using the service you agree to these terms, our Privacy policy and our Acceptable use policy. If you use the service for a business, you confirm that you may accept these terms on its behalf.',
        ],
      },
      {
        heading: 'Your account',
        points: [
          'You must give a real email address and keep your sign-in details private. You are responsible for everything sent from your account and with your API keys.',
          'Tell us straight away through "Chat with us" if you think someone else has used your account or a key. You can revoke API keys yourself on the dashboard.',
          'You must be at least 18 years old, or have permission from a parent or guardian who accepts these terms.',
        ],
      },
      {
        heading: 'Credit and payments',
        points: [
          'Credit is bought in bundles and paid in Ghana cedis (GHS) with Mobile Money or card through Moolre’s checkout. Prices are shown before you pay.',
          'Credit is added once Moolre confirms the payment. If a payment is confirmed but credit does not appear, contact us and we will check it.',
          'One credit sends one SMS part to one recipient. Longer messages use more parts, and each recipient is charged separately.',
          'Credit has no cash value, cannot be transferred to another account and is not refundable, except where Ghanaian law requires it or we made an error.',
          'We may correct your balance if credit was added or removed by mistake. Every correction is recorded and shown on your dashboard.',
        ],
      },
      {
        heading: 'Sending messages',
        points: [
          'Credits are taken when you send. If the network rejects part of a send, the credits for that part are returned to your balance.',
          'A single send can reach up to 5,000 numbers, and each message can be up to 6 SMS parts long.',
          'Custom sender IDs must be approved by us before use. We can refuse or withdraw a sender ID that misleads people or that you have no right to use.',
          'Delivery depends on the mobile networks. We do not promise that every message arrives or arrives at a particular time.',
        ],
      },
      {
        heading: 'Your responsibilities',
        body: [
          'You are responsible for the content of your messages and for having the right to contact each recipient. You must follow our Acceptable use policy and the laws of Ghana, including the Electronic Communications Act, 2008 (Act 775) and the Data Protection Act, 2012 (Act 843).',
        ],
      },
      {
        heading: 'Suspension and closing your account',
        body: [
          'We may pause sending, withhold a sender ID or suspend an account if we reasonably believe it breaks these terms, the law or a network’s rules, or puts other customers at risk. Where we can, we tell you first and explain why.',
          'You can stop using the service at any time and ask us to close your account through "Chat with us".',
        ],
      },
      {
        heading: 'Liability',
        body: [
          'We provide the service with reasonable care and skill. As far as the law allows, we are not liable for indirect losses, lost profits or losses caused by mobile networks, payment providers or events outside our control. Our total liability for any claim is limited to the amount you paid us in the three months before it arose.',
          'Nothing in these terms limits rights you have under Ghanaian consumer law that cannot be excluded.',
        ],
      },
      {
        heading: 'Changes and governing law',
        body: [
          'We may update these terms. When the change is significant, we tell you on your dashboard or by email before it takes effect. Continuing to use the service after that means you accept the new terms.',
          'These terms are governed by the laws of the Republic of Ghana, and the courts of Ghana have jurisdiction over any dispute.',
        ],
      },
    ],
  },
  {
    slug: 'privacy',
    label: 'Privacy',
    title: 'Privacy policy',
    summary: 'What personal data we collect, why we use it, who we share it with and the choices you have.',
    sections: [
      {
        heading: 'Our approach',
        body: [
          'We collect only what we need to run your account, take payments and deliver your messages. We handle personal data in line with Ghana’s Data Protection Act, 2012 (Act 843). We do not sell personal data or use it for advertising.',
        ],
      },
      {
        heading: 'What we collect',
        points: [
          'Account details: your name or business name, email address and, if you use Google sign-in, the basic profile Google shares with us.',
          'Payment records: bundle, amount, payment reference and status. Card and Mobile Money details are entered on Moolre’s checkout and are never stored by us.',
          'Messages you send: recipient phone numbers, message text, sender ID, cost and delivery status.',
          'Sender ID requests, support chat messages and any notes you send us.',
          'Security information: sign-in times and the type of device and browser used, so we can alert you to sign-ins you don’t recognise.',
          'API keys: we keep only a scrambled (hashed) version and the first few characters, never the full key.',
        ],
      },
      {
        heading: 'How we use it',
        points: [
          'To create and secure your account and to sign you in.',
          'To process payments and add credit to your balance.',
          'To send your messages through Moolre and show you their status.',
          'To review sender IDs, answer support chats and prevent fraud and abuse.',
          'To meet our legal, tax and accounting duties.',
        ],
      },
      {
        heading: 'Who we share it with',
        body: [
          'We share data only with the providers that run the service, and only what each one needs:',
        ],
        points: [
          'Moolre, for payments and SMS delivery to Ghanaian mobile networks.',
          'Netlify, which hosts the website, our database and account sign-in.',
          'Google, only if you choose to sign in with Google.',
          'Authorities, when Ghanaian law or a valid court order requires it.',
        ],
      },
      {
        heading: 'Your recipients’ data',
        body: [
          'When you upload phone numbers, you decide who receives your messages and you are responsible for having a lawful reason to contact them. We process those numbers and the message text only to deliver the send and keep your history.',
        ],
      },
      {
        heading: 'How long we keep it',
        body: [
          'We keep account, payment and message records while your account is open and for up to six years after it closes, to meet accounting and legal requirements. Support chats and security alerts are kept while your account is open.',
        ],
      },
      {
        heading: 'Your rights',
        body: [
          'You can see and update your name and email in Settings. You can also ask us for a copy of your data, to correct it or to delete your account by writing to us through "Chat with us". If you are unhappy with how we handle your data, you can complain to the Data Protection Commission of Ghana.',
        ],
      },
    ],
  },
  {
    slug: 'acceptable-use',
    label: 'Acceptable use',
    title: 'Acceptable use policy',
    summary: 'What you may and may not send with AkotoCreative SMS, so messages stay trusted and welcome.',
    sections: [
      {
        heading: 'Send only to people who expect it',
        points: [
          'Message only people who have given you their number and agreed to hear from you, or who have an existing relationship with you, such as customers, members or staff.',
          'Make it clear who the message is from. Your sender ID or the message text must identify you.',
          'Honour opt-outs. If someone asks you to stop, remove them from your lists promptly.',
          'Send marketing at reasonable hours, between 8:00 and 20:00 Ghana time.',
        ],
      },
      {
        heading: 'Not allowed',
        points: [
          'Spam, or messages to bought, rented or scraped phone number lists.',
          'Fraud, phishing, fake prizes, loan scams or messages asking for PINs, passwords or Mobile Money codes.',
          'Pretending to be another person, business, bank, network or government body, including through a sender ID.',
          'Hate speech, harassment, threats or content that encourages violence.',
          'Sexual content, illegal gambling, illegal drugs or any other unlawful goods and services.',
          'Political or religious messages that break the rules set by the National Communications Authority or the Electoral Commission.',
          'Trying to get around sending limits, sender ID checks or our security, or reselling the service without our written agreement.',
        ],
      },
      {
        heading: 'Sender IDs',
        body: [
          'Request only sender IDs that match your own name, business or brand. We may ask for proof, such as a business registration certificate, before approving one.',
        ],
      },
      {
        heading: 'What happens if this policy is broken',
        body: [
          'We may block a send, withdraw a sender ID, suspend the account or report the matter to the authorities or the mobile networks. Credit used for messages that break this policy is not refunded. To report abuse, write to us through "Chat with us" with the sender ID and the message you received.',
        ],
      },
    ],
  },
  {
    slug: 'security',
    label: 'Security',
    title: 'Security',
    summary: 'How we protect your account, payments and messages, and what you can do to stay safe.',
    sections: [
      {
        heading: 'How we protect the service',
        points: [
          'All traffic to the website and the API is encrypted with HTTPS.',
          'Passwords are handled by Netlify Identity and stored as hashes. We never see or store your password.',
          'Card and Mobile Money details are entered on Moolre’s checkout, never on our pages.',
          'We confirm every payment directly with Moolre before adding credit, so a fake or repeated payment message cannot add credit.',
          'API keys are stored only as hashes. The full key is shown once when you create it.',
          'Every account can see only its own data, and admin tools are limited to staff with an admin role.',
        ],
      },
      {
        heading: 'Alerts we send you',
        body: [
          'Your dashboard shows a security alert whenever someone signs in to your account, and whenever your password, email or Google sign-in changes. Each sign-in alert shows the device and browser used.',
        ],
      },
      {
        heading: 'Keeping your account safe',
        points: [
          'Use a strong password that you don’t use anywhere else, or sign in with Google.',
          'Keep API keys on your server only. Never put them in a website, a mobile app or a public code repository.',
          'Revoke a key on the dashboard as soon as you think it has leaked, and create a new one.',
          'We will never ask for your password, API key or Mobile Money PIN in a message, call or chat.',
        ],
      },
      {
        heading: 'Reporting a problem',
        body: [
          'If you notice a sign-in you don’t recognise, change your password in Settings and tell us through "Chat with us". If you believe you have found a security weakness in our service, please report it to us the same way and give us a reasonable time to fix it before sharing it publicly. Please do not access other customers’ data or disrupt the service while testing.',
        ],
      },
    ],
  },
  {
    slug: 'cookies',
    label: 'Cookies',
    title: 'Cookie policy',
    summary: 'The small amount of browser storage the site uses, and why it is needed.',
    sections: [
      {
        heading: 'What we use',
        body: [
          'We use only cookies and browser storage that are needed for the website to work. We do not use advertising cookies or third-party tracking, so there is nothing to opt in to.',
        ],
      },
      {
        heading: 'Sign-in',
        points: [
          'When you sign in, Netlify Identity saves a secure sign-in token in a cookie and in your browser’s local storage. It keeps you signed in as you move between pages and lets our servers check who you are. It is removed when you sign out.',
          'When you use Google sign-in, we briefly save which page to return you to and which account you were connecting. This is deleted as soon as you come back from Google.',
        ],
      },
      {
        heading: 'Payments',
        body: [
          'Moolre’s checkout page may set its own cookies to process your payment securely. Those are controlled by Moolre under their own policies.',
        ],
      },
      {
        heading: 'Managing cookies',
        body: [
          'You can clear or block cookies in your browser settings. If you block them, you will not be able to stay signed in or use the dashboard. If we ever add optional cookies, such as for analytics, we will update this page and ask for your consent first.',
        ],
      },
    ],
  },
]

export function getLegalDoc(slug: string) {
  return LEGAL_DOCS.find((doc) => doc.slug === slug)
}
