package nckd.jimin.jyyy.hr.tsrsc.plugin.form;

import kd.bos.form.control.events.ItemClickEvent;
import kd.bos.list.plugin.AbstractListPlugin;
import kd.sdk.plugin.Plugin;
import nckd.jimin.jyyy.hr.tsrsc.plugin.util.MokaApiUtil;

/**
 * 跳转Moka通用插件
 * Tyx
 * 2025-05-28
 */
public class RedirectMokaListPlugin extends AbstractListPlugin implements Plugin {
    @Override
    public void itemClick(ItemClickEvent evt) {
        String itemKey = evt.getItemKey();
        if ("nckd_moka".equals(itemKey)) {
            String mokaRedirectUrl = MokaApiUtil.getParamValue("moka_redirect_url", "https://staging-3.mokahr.com/");
            this.getView().openUrl(mokaRedirectUrl);
        }
    }
}