package com.jeesharp.business.modules.common.application.api;

import com.jeesharp.business.modules.common.api.BizSceneApi;
import com.jeesharp.business.modules.common.bizscene.application.BizSceneApplicationService;
import com.jeesharp.business.modules.common.bizscene.vo.BizSceneOptionVO;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * {@link BizSceneApi} 实现，委托 {@link BizSceneApplicationService}。
 *
 * @author jeesharp
 * @since 2026-07-03
 */
@Service
@AllArgsConstructor
public class BizSceneApiImpl implements BizSceneApi {

    private final BizSceneApplicationService bizSceneApplicationService;

    @Override
    public void assertSceneEnabled(String sceneCode, String tenantId) {
        bizSceneApplicationService.assertSceneEnabled(sceneCode, tenantId);
    }

    @Override
    public BizSceneOptionVO getOptionByCode(String sceneCode, String tenantId) {
        return bizSceneApplicationService.getOptionByCode(sceneCode, tenantId);
    }

    @Override
    public List<BizSceneOptionVO> listEnabledOptions(String capability, String tenantId) {
        return bizSceneApplicationService.listEnabledOptions(capability, tenantId);
    }
}
