{
  "$schema": "../manifest.schema.json",
  "schemaVersion": "1.0.0",
  "name": "ds-language",
  "description": "Language selector web component for English and Japanese",
  "docUrl": "https://design.soracom.io/design-system/web-components/language/",
  "category": "utility",
  "htmlElements": [
    "ds-language"
  ],
  "isWebComponent": true,
  "modifiers": {},
  "attributes": {
    "aria-label": {
      "description": "Accessible label for the internal language navigation. Defaults to the localized Language label.",
      "appliesTo": [
        {
          "elements": [
            "ds-language"
          ]
        }
      ]
    },
    "cookie-name": {
      "description": "Cookie used to persist an explicit language selection.",
      "default": "sc-lang",
      "appliesTo": [
        {
          "elements": [
            "ds-language"
          ]
        }
      ]
    },
    "value": {
      "description": "Current normalized language selection.",
      "values": [
        "en",
        "ja"
      ],
      "default": "en",
      "appliesTo": [
        {
          "elements": [
            "ds-language"
          ]
        }
      ]
    },
    "css": {
      "description": "CSS loading mode. Global CSS is used by default; shadow loads component CSS into Shadow DOM.",
      "values": [
        "global",
        "shadow"
      ],
      "default": "global",
      "appliesTo": [
        {
          "elements": [
            "ds-language"
          ]
        }
      ]
    }
  },
  "dataAttributes": [],
  "webComponentApi": {
    "tagName": "ds-language",
    "className": "DsLanguage",
    "observedAttributes": [
      "aria-label",
      "cookie-name",
      "value"
    ],
    "properties": {
      "value": {
        "type": "'en' | 'ja'",
        "description": "Current normalized language selection reflected to html[lang]."
      }
    },
    "events": [
      {
        "name": "ds-language-change",
        "description": "Dispatched when a language link is activated or value is set, with detail { value: 'en' | 'ja' }."
      }
    ]
  },
  "accessibility": {
    "role": "navigation",
    "ariaAttributes": [
      "aria-label"
    ],
    "notes": [
      "Renders native links for English and Japanese with a decorative language icon.",
      "Each link is labelled in its own language and carries the corresponding lang attribute.",
      "The selected language link carries aria-current=true."
    ]
  },
  "examples": [
    {
      "name": "basic",
      "html": "<ds-language></ds-language>"
    },
    {
      "name": "custom-cookie",
      "html": "<ds-language cookie-name=\"preferred-language\"></ds-language>"
    }
  ]
}
