<script lang="ts">
    export let type: string;
    export let text: string;
</script>

<div class="chat-message-wrapper {type}">
    <p class="chat-message">{text}</p>
</div>

<style>
    .chat-message-wrapper {
        /* rounded corners border */
        border-radius: 10px;
        margin-bottom: 8px;

    }
    .chat-message {
        padding-left: 10px;
        padding-right: 10px;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .user {
        background-color: #d1e7ff;
        text-align: right;
        margin-left: auto;
    }

    .bot {
        /* top left corner square not round */
        border-top-left-radius: 0px;
        background-color: #f0f0f0;
        text-align: left;
        margin-right: auto;

    }
</style>
