from typing import List
from typing import Dict
from typing import Any
from datetime import datetime


def create_output_template(coco_categories: List[Dict[int, str]]) -> Dict[str, Any]:
    """
    Creates template for annotation file in COCO format.

    :param coco_categories: categories to pu into template
    :return: dict with info, license and categories added
    """
    coco_output = {
        'info': {
            "description": "Example Dataset",
            "url": "https://github.com/somal/VIA2COCO",
            "version": "0.1.0",
            "year": 2021,
            "contributor": "somal",
            "date_created": datetime.utcnow().isoformat(' ')},
        'licenses': [
            {
                "id": 1,
                "name": "Attribution-NonCommercial-ShareAlike License",
                "url": "https://creativecommons.org/licenses/by-nc-sa/2.0/"
            }
        ],
        'categories': coco_categories,
        'images': [],
        'annotations': []
    }
    return coco_output