| Dec 31, 2018 | Dec 31, 2019 | Dec 31, 2020 | Dec 31, 2021 | Dec 31, 2022 | Dec 31, 2023 | Dec 31, 2024 |
|---|
| Net loss | -259 | -323 | -179 | -193 | -315 | -308 | -27 |
|---|
| Depreciation | 43 | 79 | 52 | 53 | 62 | 63 | 53 |
|---|
| Non-cash lease expense | - | - | 5 | 10 | 20 | 34 | 36 |
|---|
| Loss on disposal of property, plant and equipment | -1 | -3 | -0 | - | - | -0 | -0 |
|---|
| Revaluation of derivative contracts | -28 | -3 | 0 | -18 | 10 | -2 | -1 |
|---|
| Impairment of assets | - | 11 | - | - | 114 | 130 | - |
|---|
| Derecognition of Loan Commitment Asset | - | - | - | - | - | 53 | - |
|---|
| Stock-based compensation expense | 180 | 196 | 74 | 73 | 112 | 84 | 82 |
|---|
| Amortization of debt issuance costs | - | - | 6 | 4 | 3 | 5 | 7 |
|---|
| Loss on extinguishment of debt | - | - | -12 | - | -9 | -4 | -27 |
|---|
| Net (gain) loss on failed sale-and-leaseback transactions | - | - | - | - | - | - | 17 |
|---|
| Unrealized foreign currency exchange loss (gain) | - | - | - | - | 3 | -1 | -4 |
|---|
| Other | - | - | - | - | -4 | -0 | -0 |
|---|
| Decrease in accounts receivable | 55 | -52 | 62 | -9 | 163 | 90 | -7 |
|---|
| Contract assets | - | - | - | 22 | 22 | -5 | 104 |
|---|
| Inventories | 42 | -18 | 33 | 1 | 125 | 232 | 45 |
|---|
| Deferred cost of revenue | -88 | 22 | -20 | -18 | 24 | -2 | 13 |
|---|
| Customer financing receivable | -5 | -6 | -5 | -5 | -3 | - | - |
|---|
| Prepaid expenses and other assets | 7 | -9 | 3 | -2 | 18 | 6 | -4 |
|---|
| Other long-term assets | -2 | -4 | -3 | 3 | 3 | 3 | -4 |
|---|
| Increase (Decrease) in Operating Lease Liability | - | - | - | -13 | 3 | -33 | -37 |
|---|
| Financing lease liabilities | - | - | - | 1 | 1 | 1 | 2 |
|---|
| Accounts payable | 18 | -11 | -1 | 13 | 86 | -29 | -37 |
|---|
| Accrued warranty | 2 | -7 | -0 | 1 | 6 | 2 | -3 |
|---|
| Accrued expenses and other current liabilities | -7 | 7 | 18 | -2 | 43 | -14 | 9 |
|---|
| Deferred revenue and customer deposits | - | 37 | -13 | -23 | 35 | -43 | 140 |
|---|
| Other long-term liabilities | 18 | 4 | -5 | -4 | -10 | -1 | -1 |
|---|
| Net cash provided by (used in) operating activities | -58 | 164 | -99 | -61 | -192 | -373 | 92 |
|---|
| Purchase of property, plant and equipment | 15 | 51 | 38 | 50 | 117 | 84 | 59 |
|---|
| Proceeds from sale of property, plant and equipment | - | - | - | - | - | 0 | 0 |
|---|
| Net cash used in investing activities | -95 | 53 | -38 | -47 | -117 | -84 | -59 |
|---|
| Proceeds from issuance of debt | - | - | - | - | - | 637 | 403 |
|---|
| Payment of debt issuance costs | - | - | 13 | 2 | - | 20 | 13 |
|---|
| Repayment of debt | - | - | 177 | 123 | 20 | 191 | 141 |
|---|
| Make-whole payment related to PPAs’ debt | - | - | - | - | 101 | - | - |
|---|
| Purchase of capped call options related to convertible notes | - | - | - | - | - | 55 | - |
|---|
| Proceeds from financing obligations | - | 72 | 26 | 17 | 3 | 5 | 2 |
|---|
| Repayment of financing obligations | - | 9 | 11 | 14 | 36 | 18 | 90 |
|---|
| Distributions and payments to noncontrolling interest | 15 | 13 | 8 | 6 | 7 | 2 | - |
|---|
| Proceeds from issuance of common stock | 2 | 13 | 23 | 90 | 15 | 17 | 12 |
|---|
| Proceeds from public share offering | - | - | - | - | 385 | - | - |
|---|
| Payment of public share offering costs and issuance costs related to redeemable convertible preferred stock | 6 | - | - | - | 14 | 0 | - |
|---|
| Buyout of noncontrolling interest | - | - | - | - | 12 | 7 | - |
|---|
| Proceeds from issuance of redeemable convertible preferred stock | - | - | - | 209 | - | 311 | - |
|---|
| Dividend paid | - | - | - | - | - | - | 1 |
|---|
| Proceeds from Noncontrolling Interests | - | - | 7 | - | 3 | 7 | 4 |
|---|
| Other | - | - | - | - | -0 | - | - |
|---|
| Net cash provided by financing activities | 253 | -120 | 176 | 306 | 211 | 683 | 175 |
|---|
| Effect of exchange rate changes on cash, cash equivalent, and restricted cash | - | - | - | -1 | 0 | -0 | -3 |
|---|
| Net increase (decrease) in cash, cash equivalents, and restricted cash | 100 | 97 | 39 | 198 | -97 | 227 | 206 |
|---|
| Cash paid during the period for interest | 39 | 70 | 72 | 69 | 49 | 50 | 56 |
|---|
| Operating Lease, Payments | - | - | 3 | 17 | 14 | 33 | 36 |
|---|
| Operating cash flows from finance leases | - | - | 0 | 1 | 1 | 1 | 0 |
|---|
| Income Taxes Paid | 2 | 1 | 0 | 1 | 1 | 1 | 1 |
|---|
| Transfer of Customer Financing Receivable to Property, plant and Equipment | - | - | - | - | 43 | - | - |
|---|
| Forward To Purchase of Common Stock | - | - | - | - | 4 | - | - |
|---|
| Capital Expenditures Incurred but Not yet Paid | 12 | 2 | 7 | 6 | 11 | 9 | 2 |
|---|
| Recognition Of Operating Lease Right-Of-Use Assets, In Period | - | - | 13 | 83 | 36 | 30 | 3 |
|---|
| Recognition Of Financing Lease Right-Of-Use Assets, In Period | - | - | 0 | 2 | 1 | 1 | 2 |
|---|
| Financing Obligation, Derecognition | - | - | - | - | - | - | 102 |
|---|
| Conversion of Stock, Amount Issued | - | - | - | - | 209 | - | - |
|---|
| Fair Value of Assets Acquired | - | - | - | - | - | 76 | - |
|---|
| Equity component of redeemable convertible preferred stock | - | - | - | - | - | 16 | - |
|---|