//
//  LNEmojiData.swift
//  Lanu
//
//  Created by OneeChan on 2025/12/18.
//

import Foundation


class LNEmojiData {
    var name: String = ""
    var localizableName: String = ""
    var path: String = ""
}

class LNEmojiGroup {
    var emojis: [LNEmojiData] = []
    var groupName: String = ""
    
    private var emojiMap: [String: LNEmojiData] = [:]
    
    func emojiFor(_ name: String) -> LNEmojiData? {
        if emojiMap.count != emojis.count {
            emojiMap = emojis.reduce(into: [String: LNEmojiData](), { partialResult, emoji in
                partialResult[emoji.name] = emoji
            })
        }
        return emojiMap[name]
    }
}
