import withMock from"storybook-addon-mock";export default{title:"Components/Checkout",decorators:[withMock],argTypes:{mode:{control:{type:"select"},options:["test","live"]},currencyCode:{control:{type:"select"},options:["usd","eur"]}}};const Template=({mode:e})=>(localStorage.clear(),`<sc-checkout mode="${e}">\n  <sc-form>\n  \x3c!-- wp:surecart/price-selector {"label":"Choose A Product"}  --\x3e\n  <sc-price-choices type="radio" columns="1"><div>\x3c!-- wp:surecart/price-choice --\x3e\n  <sc-price-choice type="radio" show-label="1" show-price="1" show-control="1"></sc-price-choice>\n  \x3c!-- /wp:surecart/price-choice --\x3e</div></sc-price-choices>\n  \x3c!-- /wp:surecart/price-selector --\x3e\n\n  \x3c!-- wp:surecart/express-payment --\x3e\n  <sc-express-payment divider-text="or" class="wp-block-surecart-express-payment"></sc-express-payment>\n  \x3c!-- /wp:surecart/express-payment --\x3e\n\n  \x3c!-- wp:surecart/columns --\x3e\n  <sc-columns class="wp-block-surecart-columns">\x3c!-- wp:surecart/column --\x3e\n  <sc-column class="wp-block-surecart-column">\x3c!-- wp:surecart/name --\x3e\n  <sc-customer-name label="Name" class="wp-block-surecart-name"></sc-customer-name>\n  \x3c!-- /wp:surecart/name --\x3e</sc-column>\n  \x3c!-- /wp:surecart/column --\x3e\n\n  \x3c!-- wp:surecart/column --\x3e\n  <sc-column class="wp-block-surecart-column">\x3c!-- wp:surecart/email --\x3e\n  <sc-customer-email label="Email" autocomplete="email" inputmode="email" required class="wp-block-surecart-email"></sc-customer-email>\n  \x3c!-- /wp:surecart/email --\x3e</sc-column>\n  \x3c!-- /wp:surecart/column --\x3e</sc-columns>\n  \x3c!-- /wp:surecart/columns --\x3e\n\n  \x3c!-- wp:surecart/payment {"secure_notice":"This is a secure, encrypted payment"} --\x3e\n  <sc-payment label="Payment" secure-notice="This is a secure, encrypted payment" class="wp-block-surecart-payment"></sc-payment>\n  \x3c!-- /wp:surecart/payment --\x3e\n\n  \x3c!-- wp:surecart/totals {"collapsible":true,"collapsed":false} --\x3e\n  <sc-order-summary collapsible="1" class="wp-block-surecart-totals">\x3c!-- wp:surecart/divider --\x3e\n  <sc-divider></sc-divider>\n  \x3c!-- /wp:surecart/divider --\x3e\n\n  \x3c!-- wp:surecart/line-items --\x3e\n  <sc-line-items removable="1" editable="1" class="wp-block-surecart-line-items"></sc-line-items>\n  \x3c!-- /wp:surecart/line-items --\x3e\n\n  \x3c!-- wp:surecart/divider --\x3e\n  <sc-divider></sc-divider>\n  \x3c!-- /wp:surecart/divider --\x3e\n\n  \x3c!-- wp:surecart/subtotal --\x3e\n  <sc-line-item-total class="sc-subtotal" total="subtotal" class="wp-block-surecart-subtotal"><span slot="description">Subtotal</span></sc-line-item-total>\n  \x3c!-- /wp:surecart/subtotal --\x3e\n\n  \x3c!-- wp:surecart/tax-line-item --\x3e\n  <sc-line-item-tax class="wp-block-surecart-tax-line-item"></sc-line-item-tax>\n  \x3c!-- /wp:surecart/tax-line-item --\x3e\n\n  \x3c!-- wp:surecart/coupon {"text":"Add Coupon Code","button_text":"Apply Coupon"} --\x3e\n  <sc-coupon-form label="Add Coupon Code" button-text="Apply Coupon"></sc-coupon-form>\n  \x3c!-- /wp:surecart/coupon --\x3e\n\n  \x3c!-- wp:surecart/divider --\x3e\n  <sc-divider></sc-divider>\n  \x3c!-- /wp:surecart/divider --\x3e\n\n  \x3c!-- wp:surecart/total --\x3e\n  <sc-line-item-total total="total" size="large" show-currency="1" class="wp-block-surecart-total"><span slot="description">Total</span><span slot="subscription-title">Total Due Today</span></sc-line-item-total>\n  \x3c!-- /wp:surecart/total --\x3e</sc-order-summary>\n  \x3c!-- /wp:surecart/totals --\x3e\n\n  \x3c!-- wp:surecart/submit {"show_total":true,"full":true} --\x3e\n  <sc-button submit="1" type="primary" full="1" size="large" class="wp-block-surecart-submit"><svg slot="prefix" xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewbox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"></path></svg>Purchase<span> <sc-total></sc-total></span></sc-button>\n  \x3c!-- /wp:surecart/submit --\x3e\n\n  </sc-form>\n  </sc-checkout>`);export const Expired=Template.bind({});Expired.args={mode:"live"},Expired.parameters={mockData:[{url:"/surecart/v1/orders/?expand%5B0%5D=line_items1&expand%5B1%5D=line_item.price&expand%5B2%5D=price.product&expand%5B3%5D=customer&expand%5B4%5D=customer.shipping_address&expand%5B5%5D=payment_intent&expand%5B6%5D=discount&expand%5B7%5D=discount.promotion&expand%5B8%5D=discount.coupon&expand%5B9%5D=shipping_address&expand%5B10%5D=tax_identifier&_locale=user",method:"POST",status:403,response:{code:"rest_cookie_invalid_nonce",message:"Cookie check failed",data:{status:403}}}]};