{"version":3,"names":["scTotalCss","ScTotalStyle0","ORDER_KEYS","total","subtotal","amount_due","ScTotal","this","order_key","render","_a","checkoutState","checkout","currency","_d","_c","_b","line_items","data","length","_e"],"sources":["src/components/controllers/checkout-form/total/sc-total.css?tag=sc-total","src/components/controllers/checkout-form/total/sc-total.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.total-amount{\n display: inline-block;\n}\n","import { Component, Prop } from '@stencil/core';\nimport { state as checkoutState } from '@store/checkout';\n\nconst ORDER_KEYS = {\n total: 'total_display_amount',\n subtotal: 'subtotal_display_amount',\n amount_due: 'amount_due_display_amount',\n};\n\n@Component({\n tag: 'sc-total',\n styleUrl: 'sc-total.css',\n shadow: false,\n})\nexport class ScTotal {\n @Prop() total: 'total' | 'subtotal' | 'amount_due' = 'amount_due';\n\n order_key = {\n total: 'total_display_amount',\n subtotal: 'subtotal_display_amount',\n amount_due: 'amount_due_display_amount',\n };\n\n render() {\n if (!checkoutState?.checkout?.currency) return;\n if (!checkoutState?.checkout?.line_items?.data?.length) return;\n return checkoutState?.checkout?.[ORDER_KEYS[this.total]] || '';\n }\n}\n"],"mappings":"gSAAA,MAAMA,EAAa,0DACnB,MAAAC,EAAeD,ECEf,MAAME,EAAa,CACjBC,MAAO,uBACPC,SAAU,0BACVC,WAAY,6B,MAQDC,EAAO,M,yBAGlBC,KAAAC,UAAY,CACVL,MAAO,uBACPC,SAAU,0BACVC,WAAY,6B,WALuC,Y,CAQrD,MAAAI,G,cACE,MAAKC,EAAAC,IAAa,MAAbA,SAAa,SAAbA,EAAeC,YAAQ,MAAAF,SAAA,SAAAA,EAAEG,UAAU,OACxC,MAAKC,GAAAC,GAAAC,EAAAL,IAAa,MAAbA,SAAa,SAAbA,EAAeC,YAAQ,MAAAI,SAAA,SAAAA,EAAEC,cAAU,MAAAF,SAAA,SAAAA,EAAEG,QAAI,MAAAJ,SAAA,SAAAA,EAAEK,QAAQ,OACxD,QAAOC,EAAAT,IAAa,MAAbA,SAAa,SAAbA,EAAeC,YAAQ,MAAAQ,SAAA,SAAAA,EAAGlB,EAAWK,KAAKJ,UAAW,E","ignoreList":[]}