import logging


def calc_lcoe_capex(capex, fcf, cf=1, basis="perkw"):
    """
    Calculate capex component of lcoe
    :param capex: Capex in the form of CURR/MW
    :param cf: capacity factor, default is 1
    :param fcf: Plant life cost inflation corrector
    :param basis: Default is per MW, it is there to be open to implement other values
    :return: LCOE CAPEX component in CURR per KWh
    """
    if basis == "perkw":
        capex_lcoe = capex * fcf / (cf * 8760)
    else:
        logging.warning("Currently there is no other basis implemented")
        return None
    return capex_lcoe