from enum import StrEnum

__all__ = ['CK']

class CK(StrEnum):
    '''CanonicalKey 定数群。

    StrEnum を使用。``CK.REVENUE == "revenue"`` が True（.value 不要）。
    ``isinstance(CK.REVENUE, str)`` も True のため dict[str, ...] にそのまま使える。

    命名規則: 大文字スネークケース。値は小文字スネークケースの文字列。

    セクション:
        PL — 損益計算書の科目
        BS — 貸借対照表の科目
        CF — キャッシュフロー計算書の科目
        KPI — 主要経営指標
        CI — 包括利益計算書（IFRS）
    '''
    REVENUE = 'revenue'
    COST_OF_SALES = 'cost_of_sales'
    GROSS_PROFIT = 'gross_profit'
    SGA_EXPENSES = 'sga_expenses'
    OPERATING_INCOME = 'operating_income'
    NON_OPERATING_INCOME = 'non_operating_income'
    NON_OPERATING_EXPENSES = 'non_operating_expenses'
    ORDINARY_INCOME = 'ordinary_income'
    EXTRAORDINARY_INCOME = 'extraordinary_income'
    EXTRAORDINARY_LOSS = 'extraordinary_loss'
    OTHER_INCOME_IFRS = 'other_income_ifrs'
    OTHER_EXPENSES_IFRS = 'other_expenses_ifrs'
    FINANCE_INCOME = 'finance_income'
    FINANCE_COSTS = 'finance_costs'
    EQUITY_METHOD_INCOME_IFRS = 'equity_method_income_ifrs'
    INCOME_BEFORE_TAX = 'income_before_tax'
    INCOME_TAXES = 'income_taxes'
    INCOME_TAXES_DEFERRED = 'income_taxes_deferred'
    NET_INCOME = 'net_income'
    NET_INCOME_PARENT = 'net_income_parent'
    NET_INCOME_MINORITY = 'net_income_minority'
    CASH_AND_DEPOSITS = 'cash_and_deposits'
    CASH_AND_EQUIVALENTS = 'cash_and_equivalents'
    TRADE_RECEIVABLES = 'trade_receivables'
    INVENTORIES = 'inventories'
    CURRENT_ASSETS = 'current_assets'
    NONCURRENT_ASSETS = 'noncurrent_assets'
    PPE = 'ppe'
    INTANGIBLE_ASSETS = 'intangible_assets'
    INVESTMENTS_AND_OTHER = 'investments_and_other'
    DEFERRED_ASSETS = 'deferred_assets'
    TOTAL_ASSETS = 'total_assets'
    TRADE_PAYABLES = 'trade_payables'
    CURRENT_LIABILITIES = 'current_liabilities'
    NONCURRENT_LIABILITIES = 'noncurrent_liabilities'
    TOTAL_LIABILITIES = 'total_liabilities'
    CAPITAL_STOCK = 'capital_stock'
    CAPITAL_SURPLUS = 'capital_surplus'
    RETAINED_EARNINGS = 'retained_earnings'
    TREASURY_STOCK = 'treasury_stock'
    SHAREHOLDERS_EQUITY = 'shareholders_equity'
    OCI_ACCUMULATED = 'oci_accumulated'
    STOCK_OPTIONS = 'stock_options'
    EQUITY_PARENT = 'equity_parent'
    MINORITY_INTERESTS = 'minority_interests'
    NET_ASSETS = 'net_assets'
    LIABILITIES_AND_NET_ASSETS = 'liabilities_and_net_assets'
    DEPRECIATION_CF = 'depreciation_cf'
    IMPAIRMENT_LOSS_CF = 'impairment_loss_cf'
    GOODWILL_AMORTIZATION_CF = 'goodwill_amortization_cf'
    ALLOWANCE_DOUBTFUL_CHANGE_CF = 'allowance_doubtful_change_cf'
    INTEREST_DIVIDEND_INCOME_CF = 'interest_dividend_income_cf'
    INTEREST_EXPENSE_CF = 'interest_expense_cf'
    FX_LOSS_GAIN_CF = 'fx_loss_gain_cf'
    EQUITY_METHOD_CF = 'equity_method_cf'
    PPE_SALE_LOSS_GAIN_CF = 'ppe_sale_loss_gain_cf'
    TRADE_RECEIVABLES_CHANGE_CF = 'trade_receivables_change_cf'
    INVENTORIES_CHANGE_CF = 'inventories_change_cf'
    TRADE_PAYABLES_CHANGE_CF = 'trade_payables_change_cf'
    OTHER_OPERATING_CF = 'other_operating_cf'
    SUBTOTAL_OPERATING_CF = 'subtotal_operating_cf'
    INCOME_TAXES_PAID_CF = 'income_taxes_paid_cf'
    OPERATING_CF = 'operating_cf'
    PURCHASE_PPE_CF = 'purchase_ppe_cf'
    PROCEEDS_PPE_SALE_CF = 'proceeds_ppe_sale_cf'
    PURCHASE_INVESTMENT_SECURITIES_CF = 'purchase_investment_securities_cf'
    PROCEEDS_INVESTMENT_SECURITIES_CF = 'proceeds_investment_securities_cf'
    LOANS_PAID_CF = 'loans_paid_cf'
    LOANS_COLLECTED_CF = 'loans_collected_cf'
    OTHER_INVESTING_CF = 'other_investing_cf'
    INVESTING_CF = 'investing_cf'
    PROCEEDS_LONG_TERM_LOANS_CF = 'proceeds_long_term_loans_cf'
    REPAYMENT_LONG_TERM_LOANS_CF = 'repayment_long_term_loans_cf'
    PROCEEDS_BONDS_CF = 'proceeds_bonds_cf'
    REDEMPTION_BONDS_CF = 'redemption_bonds_cf'
    PURCHASE_TREASURY_STOCK_CF = 'purchase_treasury_stock_cf'
    DIVIDENDS_PAID_CF = 'dividends_paid_cf'
    OTHER_FINANCING_CF = 'other_financing_cf'
    FINANCING_CF = 'financing_cf'
    FX_EFFECT_ON_CASH = 'fx_effect_on_cash'
    NET_CHANGE_IN_CASH = 'net_change_in_cash'
    CONSOLIDATION_SCOPE_CHANGE_CASH = 'consolidation_scope_change_cash'
    CASH_BEGINNING = 'cash_beginning'
    CASH_END = 'cash_end'
    EPS = 'eps'
    EPS_DILUTED = 'eps_diluted'
    BPS = 'bps'
    DPS = 'dps'
    EQUITY_RATIO = 'equity_ratio'
    ROE = 'roe'
    PER = 'per'
    EMPLOYEES = 'employees'
    COMPREHENSIVE_INCOME = 'comprehensive_income'
    COMPREHENSIVE_INCOME_PARENT = 'comprehensive_income_parent'
    COMPREHENSIVE_INCOME_MINORITY = 'comprehensive_income_minority'
