def mocked_notification_requests_post_status_201(*args, **kwargs):
    """Mocked creating data with status code 201(created)"""

    class MockResponse:
        status_code = 201

        def json(self) -> dict:
            data = {
                'success': True,
                'data': [{'identifier': '21-07-573',
                          'uuid': '87e37777-0a7c-4879-888b-86f1d9cdb175',
                          'create_time': '2021-07-14T22:32:37.845Z'}]}
            return data

    return MockResponse()


def mocked_notification_requests_post_status_200(*args, **kwargs):
    """Mocked updating data with status code 200(updated)"""

    class MockResponse:
        status_code = 200

        def json(self) -> dict:
            data = {'success': True,
                    'data': [{'identifier': 'ARMA-22-02-29',
                              'uuid': 'b1cad9fa-c5b4-4c1b-acdf-719cafb52e50',
                              'update_time': '2022-02-08T13:37:35.677Z'}]
                    }
            return data

    return MockResponse()


def mocked_notification_requests_post_status_400(*args, **kwargs):
    """Mocked creating data witch nit valid data status code 400"""

    class MockResponse:
        status_code = 400

        def json(self) -> dict:
            data = {
                    "success": False,
                    "message": "[400 Bad Request] Передан неверный токен",
                    "error": "Передан неверный токен",
                    "statusCode": 400
            }
            return data

    return MockResponse()


def mocked_notification_request_get_status_200(*args, **kwargs):
    class MockResponse:
        status_code = 200

        def json(self) -> dict:
            data = {
                'data': {
                    "next": False,
                    "result": [
                        {
                            "status": {
                                "id": 4,
                                "name": "Отправлено в архив"
                            },
                            'updated': '2022-02-07T07:30:51.537Z',
                        },
                    ]
                }
            }
            return data

    return MockResponse()


def mock_comments_request_post_status_200(*args, **kwargs):
    """Mocking response data from sending comment to ncircc."""

    class MockResponse:
        status_code = 200

        def json(self) -> dict:
            return {
                'data': {'id': 30707,
                         'incident_id': 82369,
                         'comment': 'hello! this is test msg from test',
                         'user_id': 139,
                         'd_comment': '2022-02-14T00:00:00.000Z',
                         't_comment': '12:47:00',
                         'createdAt': '2022-02-14T12:47:51.217Z',
                         'updatedAt': '2022-02-14T12:47:51.217Z',
                         'to': '',
                         'parent_id': None,
                         'workgroup_resolved': False,
                         'options': {}},
                'success': True
            }

    return MockResponse()


def mock_comments_request_get_all_200(*args, **kwargs):
    class MockResponse:
        status_code = 200

        def json(self) -> dict:
            return {'data': [
                {'id': 30765,
                 'incident.uuid': 'dd6dda3b-68ee-4885-9186-b5fc56ab3f13',
                 'text': 'text 1',
                 'login': 'ТИ НКЦКИ',
                 'incident.id': 'ARMA-22-02-59',
                 'create_time': '2022-02-15T12:25:32.469Z'},
                {'id': 30762,
                 'incident.uuid': 'dd6dda3b-68ee-4885-9186-b5fc56ab3f03',
                 'text': 'text2',
                 'login': 'ТИ НКЦКИ',
                 'incident.id': 'ARMA-22-02-59',
                 'create_time': '2022-02-15T12:23:34.412Z'},
                {'id': 30761,
                 'incident.uuid': 'dd6dda3b-68ee-4885-9186-b5fc56ab3f03',
                 'text': 'Text 3',
                 'login': 'ТИ НКЦКИ',
                 'incident.id': 'ARMA-22-02-59',
                 'create_time': '2022-02-15T12:23:32.176Z'},
                {'id': 30760,
                 'incident.uuid': 'dd6dda3b-68ee-4885-9186-b5fc56ab3f03',
                 'text': 'Text 4',
                 'login': 'ТИ НКЦКИ',
                 'incident.id': 'ARMA-22-02-59',
                 'create_time': '2022-02-15T12:23:30.964Z'},
            ],
                'success': True}

    return MockResponse()
