package com.vpn.fastestvpnservice.customItems

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.material.Text
import androidx.compose.material3.MaterialTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.vpn.fastestvpnservice.R
import com.vpn.fastestvpnservice.beans.Notification

@Composable
fun NotificationItem(item: Notification) {
    Box(modifier = Modifier
        .background(MaterialTheme.colorScheme.background)
        .fillMaxWidth()
    ) {
        Column(
            
        ) {
            Text(
                text = item.title,
                style = TextStyle(
                    fontSize = 16.sp,
                    color = MaterialTheme.colorScheme.primary
                ),
                modifier = Modifier
                    .padding(start = 16.dp, bottom = 5.dp)
                    .fillMaxWidth(),
                maxLines = 2
            )
            Text(
                text = item.html,
                style = TextStyle(
                    fontSize = 16.sp,
                    color = MaterialTheme.colorScheme.primary
                ),
                modifier = Modifier
                    .padding(start = 16.dp, bottom = 0.dp)
                    .fillMaxWidth(),
                maxLines = 2
            )
        }
    }
}

@Preview
@Composable
fun NotificationItemPreview() {
    NotificationItem(Notification("0", "Title", "Description"))
}