// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`t-model directive .lazy modifier 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"change\\"/><span><block-text-2/></span></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'text';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let txt1 = ctx['state'].text;
    return block1([prop1, hdlr1, txt1]);
  }
}"
`;

exports[`t-model directive .number modifier 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'number';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = toNumber(ev.target.value); }];
    let txt1 = ctx['state'].number;
    return block1([prop1, hdlr1, txt1]);
  }
}"
`;

exports[`t-model directive .trim modifier 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'text';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value.trim(); }];
    let txt1 = ctx['state'].text;
    return block1([prop1, hdlr1, txt1]);
  }
}"
`;

exports[`t-model directive basic use, on an input 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'text';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let txt1 = ctx['state'].text;
    return block1([prop1, hdlr1, txt1]);
  }
}"
`;

exports[`t-model directive basic use, on an input with bracket expression 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'text';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let txt1 = ctx['state'].text;
    return block1([prop1, hdlr1, txt1]);
  }
}"
`;

exports[`t-model directive basic use, on another key in component 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['some'];
    const expr1 = 'text';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let txt1 = ctx['some'].text;
    return block1([prop1, hdlr1, txt1]);
  }
}"
`;

exports[`t-model directive can also define t-on directive on same event, part 1 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\" block-handler-2=\\"input\\"/></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'text';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let hdlr2 = [ctx['onInput'], ctx];
    return block1([prop1, hdlr1, hdlr2]);
  }
}"
`;

exports[`t-model directive can also define t-on directive on same event, part 2 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input type=\\"radio\\" id=\\"one\\" value=\\"One\\" block-property-0=\\"checked\\" block-handler-1=\\"click\\" block-handler-2=\\"click\\"/><input type=\\"radio\\" id=\\"two\\" value=\\"Two\\" block-property-3=\\"checked\\" block-handler-4=\\"click\\" block-handler-5=\\"click\\"/><input type=\\"radio\\" id=\\"three\\" value=\\"Three\\" block-property-6=\\"checked\\" block-handler-7=\\"click\\" block-handler-8=\\"click\\"/></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'choice';
    let prop1 = bExpr1[expr1] === 'One';
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let hdlr2 = [ctx['onClick'], ctx];
    const bExpr2 = ctx['state'];
    const expr2 = 'choice';
    let prop2 = bExpr2[expr2] === 'Two';
    let hdlr3 = [(ev) => { bExpr2[expr2] = ev.target.value; }];
    let hdlr4 = [ctx['onClick'], ctx];
    const bExpr3 = ctx['state'];
    const expr3 = 'choice';
    let prop3 = bExpr3[expr3] === 'Three';
    let hdlr5 = [(ev) => { bExpr3[expr3] = ev.target.value; }];
    let hdlr6 = [ctx['onClick'], ctx];
    return block1([prop1, hdlr1, hdlr2, prop2, hdlr3, hdlr4, prop3, hdlr5, hdlr6]);
  }
}"
`;

exports[`t-model directive following a scope protecting directive (e.g. t-set) 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { isBoundary, withDefault, setContextValue, toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    ctx = Object.create(ctx);
    ctx[isBoundary] = 1
    setContextValue(ctx, \\"admiral\\", 'Bruno');
    const bExpr1 = ctx['state'];
    const expr1 = 'text';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    return block1([prop1, hdlr1]);
  }
}"
`;

exports[`t-model directive in a t-foreach 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { prepareList, toNumber, withKey } = helpers;
  
  let block1 = createBlock(\`<div><block-child-0/></div>\`);
  let block3 = createBlock(\`<input type=\\"checkbox\\" block-property-0=\\"checked\\" block-handler-1=\\"input\\"/>\`);
  
  return function template(ctx, node, key = \\"\\") {
    ctx = Object.create(ctx);
    const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state']);;
    for (let i1 = 0; i1 < l_block2; i1++) {
      ctx[\`thing\`] = k_block2[i1];
      const key1 = ctx['thing'].id;
      const bExpr1 = ctx['thing'];
      const expr1 = 'f';
      let prop1 = bExpr1[expr1];
      let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.checked; }];
      c_block2[i1] = withKey(block3([prop1, hdlr1]), key1);
    }
    const b2 = list(c_block2);
    return block1([], [b2]);
  }
}"
`;

exports[`t-model directive in a t-foreach, part 2 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { prepareList, toNumber, withKey } = helpers;
  
  let block1 = createBlock(\`<div><block-child-0/></div>\`);
  let block3 = createBlock(\`<input block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
  
  return function template(ctx, node, key = \\"\\") {
    ctx = Object.create(ctx);
    const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state']);;
    for (let i1 = 0; i1 < l_block2; i1++) {
      ctx[\`thing\`] = k_block2[i1];
      ctx[\`thing_index\`] = i1;
      const key1 = ctx['thing_index'];
      const bExpr1 = ctx['state'];
      const expr1 = ctx['thing_index'];
      let prop1 = bExpr1[expr1];
      let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
      c_block2[i1] = withKey(block3([prop1, hdlr1]), key1);
    }
    const b2 = list(c_block2);
    return block1([], [b2]);
  }
}"
`;

exports[`t-model directive in a t-foreach, part 3 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { prepareList, toNumber, withKey } = helpers;
  
  let block1 = createBlock(\`<div><block-child-0/></div>\`);
  let block3 = createBlock(\`<input block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
  
  return function template(ctx, node, key = \\"\\") {
    ctx = Object.create(ctx);
    const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['names']);;
    for (let i1 = 0; i1 < l_block2; i1++) {
      ctx[\`name\`] = k_block2[i1];
      ctx[\`name_index\`] = i1;
      const key1 = ctx['name_index'];
      const bExpr1 = ctx['state'].values;
      const expr1 = ctx['name'];
      let prop1 = bExpr1[expr1];
      let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
      c_block2[i1] = withKey(block3([prop1, hdlr1]), key1);
    }
    const b2 = list(c_block2);
    return block1([], [b2]);
  }
}"
`;

exports[`t-model directive on a select 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><select block-property-0=\\"value\\" block-handler-1=\\"change\\"><option value=\\"\\">Please select one</option><option value=\\"red\\">Red</option><option value=\\"blue\\">Blue</option></select><span>Choice: <block-text-2/></span></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'color';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let txt1 = ctx['state'].color;
    return block1([prop1, hdlr1, txt1]);
  }
}"
`;

exports[`t-model directive on a select, initial state 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><select block-property-0=\\"value\\" block-handler-1=\\"change\\"><option value=\\"\\">Please select one</option><option value=\\"red\\">Red</option><option value=\\"blue\\">Blue</option></select></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'color';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    return block1([prop1, hdlr1]);
  }
}"
`;

exports[`t-model directive on a sub state key 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'].something;
    const expr1 = 'text';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let txt1 = ctx['state'].something.text;
    return block1([prop1, hdlr1, txt1]);
  }
}"
`;

exports[`t-model directive on an input type=radio 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input type=\\"radio\\" id=\\"one\\" value=\\"One\\" block-property-0=\\"checked\\" block-handler-1=\\"click\\"/><input type=\\"radio\\" id=\\"two\\" value=\\"Two\\" block-property-2=\\"checked\\" block-handler-3=\\"click\\"/><span>Choice: <block-text-4/></span></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'choice';
    let prop1 = bExpr1[expr1] === 'One';
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    const bExpr2 = ctx['state'];
    const expr2 = 'choice';
    let prop2 = bExpr2[expr2] === 'Two';
    let hdlr2 = [(ev) => { bExpr2[expr2] = ev.target.value; }];
    let txt1 = ctx['state'].choice;
    return block1([prop1, hdlr1, prop2, hdlr2, txt1]);
  }
}"
`;

exports[`t-model directive on an input type=radio, with initial value 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input type=\\"radio\\" id=\\"one\\" value=\\"One\\" block-property-0=\\"checked\\" block-handler-1=\\"click\\"/><input type=\\"radio\\" id=\\"two\\" value=\\"Two\\" block-property-2=\\"checked\\" block-handler-3=\\"click\\"/></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'choice';
    let prop1 = bExpr1[expr1] === 'One';
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    const bExpr2 = ctx['state'];
    const expr2 = 'choice';
    let prop2 = bExpr2[expr2] === 'Two';
    let hdlr2 = [(ev) => { bExpr2[expr2] = ev.target.value; }];
    return block1([prop1, hdlr1, prop2, hdlr2]);
  }
}"
`;

exports[`t-model directive on an input, type=checkbox 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input type=\\"checkbox\\" block-property-0=\\"checked\\" block-handler-1=\\"input\\"/><span><block-child-0/><block-child-1/></span></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    let b2, b3;
    const bExpr1 = ctx['state'];
    const expr1 = 'flag';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.checked; }];
    if (ctx['state'].flag) {
      b2 = text(\`yes\`);
    } else {
      b3 = text(\`no\`);
    }
    return block1([prop1, hdlr1], [b2, b3]);
  }
}"
`;

exports[`t-model directive on an textarea 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><textarea block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'text';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let txt1 = ctx['state'].text;
    return block1([prop1, hdlr1, txt1]);
  }
}"
`;

exports[`t-model directive t-model is applied before t-on-input 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\" block-handler-2=\\"input\\"/></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'text';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let hdlr2 = [ctx['onInput'], ctx];
    return block1([prop1, hdlr1, hdlr2]);
  }
}"
`;

exports[`t-model directive t-model on an input with an undefined value 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<input block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'text';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    return block1([prop1, hdlr1]);
  }
}"
`;

exports[`t-model directive t-model on select with static options 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><select block-property-0=\\"value\\" block-handler-1=\\"change\\"><option value=\\"a\\"><block-text-2/></option><option value=\\"b\\"><block-text-3/></option><option value=\\"c\\"><block-text-4/></option></select></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'model';
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let txt1 = 'a';
    let txt2 = 'b';
    let txt3 = 'c';
    return block1([prop1, hdlr1, txt1, txt2, txt3]);
  }
}"
`;

exports[`t-model directive t-model with dynamic number values on select options in foreach 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber, prepareList, withKey } = helpers;
  
  let block1 = createBlock(\`<select block-handler-0=\\"change\\"><block-child-0/></select>\`);
  let block3 = createBlock(\`<option block-attribute-0=\\"value\\" block-attribute-1=\\"selected\\"><block-text-2/></option>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'value';
    const bValue1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = toNumber(ev.target.value); }];
    ctx = Object.create(ctx);
    const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].options);;
    for (let i1 = 0; i1 < l_block2; i1++) {
      ctx[\`o\`] = k_block2[i1];
      const key1 = ctx['o'].value;
      let attr1 = ctx['o'].value;
      let attr2 = bValue1 === ctx['o'].value;
      let txt1 = ctx['o'].value;
      c_block2[i1] = withKey(block3([attr1, attr2, txt1]), key1);
    }
    const b2 = list(c_block2);
    return block1([hdlr1], [b2]);
  }
}"
`;

exports[`t-model directive t-model with dynamic values on select options -- 2 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><select block-handler-0=\\"change\\"><option block-attribute-1=\\"value\\" block-attribute-2=\\"selected\\"><block-text-3/></option><option block-attribute-4=\\"value\\" block-attribute-5=\\"selected\\"><block-text-6/></option></select></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'model';
    const bValue1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let attr1 = ctx['options'][0];
    let attr2 = bValue1 === ctx['options'][0];
    let txt1 = ctx['options'][0];
    let attr3 = (ctx['options'][1]);
    let attr4 = bValue1 === (ctx['options'][1]);
    let txt2 = ctx['options'][1];
    return block1([hdlr1, attr1, attr2, txt1, attr3, attr4, txt2]);
  }
}"
`;

exports[`t-model directive t-model with dynamic values on select options -- 3 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><select block-handler-0=\\"change\\"><option block-attribute-1=\\"value\\" block-attribute-2=\\"selected\\"><block-text-3/></option><option value=\\"b\\" block-attribute-4=\\"selected\\"><block-text-5/></option></select></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'model';
    const bValue1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let attr1 = ctx['options'][0];
    let attr2 = bValue1 === ctx['options'][0];
    let txt1 = ctx['options'][0];
    let attr3 = bValue1 === \\"b\\";
    let txt2 = ctx['options'][1];
    return block1([hdlr1, attr1, attr2, txt1, attr3, txt2]);
  }
}"
`;

exports[`t-model directive t-model with dynamic values on select options 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><select block-handler-0=\\"change\\"><option block-attribute-1=\\"value\\" block-attribute-2=\\"selected\\"><block-text-3/></option><option block-attribute-4=\\"value\\" block-attribute-5=\\"selected\\"><block-text-6/></option></select></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'model';
    const bValue1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let attr1 = ctx['options'][0];
    let attr2 = bValue1 === ctx['options'][0];
    let txt1 = ctx['options'][0];
    let attr3 = ctx['options'][1];
    let attr4 = bValue1 === ctx['options'][1];
    let txt2 = ctx['options'][1];
    return block1([hdlr1, attr1, attr2, txt1, attr3, attr4, txt2]);
  }
}"
`;

exports[`t-model directive t-model with dynamic values on select options in foreach 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber, prepareList, withKey } = helpers;
  
  let block1 = createBlock(\`<div><select block-handler-0=\\"change\\"><block-child-0/></select></div>\`);
  let block3 = createBlock(\`<option block-attribute-0=\\"value\\" block-attribute-1=\\"selected\\"><block-text-2/></option>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'];
    const expr1 = 'model';
    const bValue1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    ctx = Object.create(ctx);
    const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['options']);;
    for (let i1 = 0; i1 < l_block2; i1++) {
      ctx[\`v\`] = k_block2[i1];
      const key1 = ctx['v'];
      let attr1 = ctx['v'];
      let attr2 = bValue1 === ctx['v'];
      let txt1 = ctx['v'];
      c_block2[i1] = withKey(block3([attr1, attr2, txt1]), key1);
    }
    const b2 = list(c_block2);
    return block1([hdlr1], [b2]);
  }
}"
`;

exports[`t-model directive t-model with radio button group in t-foreach 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { prepareList, toNumber, withKey } = helpers;
  
  let block1 = createBlock(\`<div id=\\"get_data\\" block-handler-0=\\"click\\"><block-child-0/></div>\`);
  let block3 = createBlock(\`<input type=\\"radio\\" name=\\"radio_group\\" block-property-0=\\"value\\" block-attribute-1=\\"id\\" block-property-2=\\"checked\\" block-handler-3=\\"click\\"/>\`);
  
  return function template(ctx, node, key = \\"\\") {
    let hdlr1 = [ctx['getData'], ctx];
    ctx = Object.create(ctx);
    const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['options']);;
    for (let i1 = 0; i1 < l_block2; i1++) {
      ctx[\`opt\`] = k_block2[i1];
      const key1 = ctx['opt'];
      let prop1 = new String((ctx['opt']) === 0 ? 0 : ((ctx['opt']) || \\"\\"));
      let attr1 = ctx['opt'];
      const bExpr1 = ctx['state'];
      const expr1 = 'group';
      let prop2 = bExpr1[expr1] === ctx['opt'];
      let hdlr2 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
      c_block2[i1] = withKey(block3([prop1, attr1, prop2, hdlr2]), key1);
    }
    const b2 = list(c_block2);
    return block1([hdlr1], [b2]);
  }
}"
`;

exports[`t-model directive two inputs in a div alternating with a t-if 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
  let block2 = createBlock(\`<input class=\\"a\\" block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
  let block3 = createBlock(\`<input class=\\"b\\" block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
  
  return function template(ctx, node, key = \\"\\") {
    let b2, b3;
    if (ctx['state'].flag) {
      const bExpr1 = ctx['state'];
      const expr1 = 'text1';
      let prop1 = bExpr1[expr1];
      let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
      b2 = block2([prop1, hdlr1]);
    }
    if (!ctx['state'].flag) {
      const bExpr2 = ctx['state'];
      const expr2 = 'text2';
      let prop2 = bExpr2[expr2];
      let hdlr2 = [(ev) => { bExpr2[expr2] = ev.target.value; }];
      b3 = block3([prop2, hdlr2]);
    }
    return block1([], [b2, b3]);
  }
}"
`;

exports[`t-model directive with expression having a changing key 1`] = `
"function anonymous(app, bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, comment } = bdom;
  let { toNumber } = helpers;
  
  let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    const bExpr1 = ctx['state'].something;
    const expr1 = ctx['text'].key;
    let prop1 = bExpr1[expr1];
    let hdlr1 = [(ev) => { bExpr1[expr1] = ev.target.value; }];
    let txt1 = ctx['state'].something[ctx['text'].key];
    return block1([prop1, hdlr1, txt1]);
  }
}"
`;
