//
//  LNIMChatUnknownMessageCell.swift
//  Lanu
//
//  Created by OneeChan on 2025/12/8.
//

import Foundation
import UIKit
import SnapKit

class LNIMChatUnknownMessageCell: UITableViewCell {
    private let contentLabel = UILabel()
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        setupViews()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}

extension LNIMChatUnknownMessageCell {
    private func setupViews() {
        backgroundColor = .clear
        
        let container = UIView()
        container.backgroundColor = .fill
        container.layer.cornerRadius = 11
        contentView.addSubview(container)
        container.snp.makeConstraints { make in
            make.top.equalToSuperview().offset(2)
            make.centerX.equalToSuperview()
            make.leading.greaterThanOrEqualToSuperview().offset(20)
            make.bottom.equalToSuperview().offset(-10)
        }
        
        contentLabel.text = .init(key: "A00077")
        contentLabel.font = .body_xs
        contentLabel.textColor = .text_3
        container.addSubview(contentLabel)
        contentLabel.snp.makeConstraints { make in
            make.verticalEdges.equalToSuperview().inset(4)
            make.horizontalEdges.equalToSuperview().inset(8)
        }
    }
}

