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

exports[`basics basic use 1`] = `
"function anonymous(bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, component } = bdom;
  let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
  
  let block1 = createBlock(\`<span>child<block-text-0/></span>\`);
  
  return function template(ctx, node, key = \\"\\") {
    let d1 = ctx['props'].p;
    return block1([d1]);
  }
}"
`;

exports[`basics basic use 2`] = `
"function anonymous(bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, component } = bdom;
  let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
  
  return function template(ctx, node, key = \\"\\") {
    return component(\`Child\`, {p: 1}, key + \`__1\`, node, ctx);
  }
}"
`;

exports[`basics can select a sub widget  1`] = `
"function anonymous(bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, component } = bdom;
  let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
  
  let block1 = createBlock(\`<span>CHILD 1</span>\`);
  
  return function template(ctx, node, key = \\"\\") {
    return block1();
  }
}"
`;

exports[`basics can select a sub widget  2`] = `
"function anonymous(bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, component } = bdom;
  let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
  
  let block1 = createBlock(\`<div>CHILD 2</div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    return block1();
  }
}"
`;

exports[`basics can select a sub widget  3`] = `
"function anonymous(bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, component } = bdom;
  let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
  
  return function template(ctx, node, key = \\"\\") {
    let b2,b3;
    if (ctx['env'].flag) {
      b2 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
    }
    if (!ctx['env'].flag) {
      b3 = component(\`OtherChild\`, {}, key + \`__2\`, node, ctx);
    }
    return multi([b2, b3]);
  }
}"
`;

exports[`basics can select a sub widget, part 2 1`] = `
"function anonymous(bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, component } = bdom;
  let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
  
  let block1 = createBlock(\`<span>CHILD 1</span>\`);
  
  return function template(ctx, node, key = \\"\\") {
    return block1();
  }
}"
`;

exports[`basics can select a sub widget, part 2 2`] = `
"function anonymous(bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, component } = bdom;
  let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
  
  let block1 = createBlock(\`<div>CHILD 2</div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    return block1();
  }
}"
`;

exports[`basics can select a sub widget, part 2 3`] = `
"function anonymous(bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, component } = bdom;
  let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
  
  return function template(ctx, node, key = \\"\\") {
    let b2,b3;
    if (ctx['state'].flag) {
      b2 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
    }
    if (!ctx['state'].flag) {
      b3 = component(\`OtherChild\`, {}, key + \`__2\`, node, ctx);
    }
    return multi([b2, b3]);
  }
}"
`;

exports[`basics sub widget is interactive 1`] = `
"function anonymous(bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, component } = bdom;
  let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
  
  let block1 = createBlock(\`<span><button block-handler-0=\\"click\\">click</button>child<block-text-1/></span>\`);
  
  return function template(ctx, node, key = \\"\\") {
    let d1 = [ctx, 'inc'];
    let d2 = ctx['state'].val;
    return block1([d1, d2]);
  }
}"
`;

exports[`basics sub widget is interactive 2`] = `
"function anonymous(bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, component } = bdom;
  let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
  
  return function template(ctx, node, key = \\"\\") {
    return component(\`Child\`, {p: 1}, key + \`__1\`, node, ctx);
  }
}"
`;

exports[`basics top level sub widget with a parent 1`] = `
"function anonymous(bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, component } = bdom;
  let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
  
  let block1 = createBlock(\`<span>Hello</span>\`);
  
  return function template(ctx, node, key = \\"\\") {
    return block1();
  }
}"
`;

exports[`basics top level sub widget with a parent 2`] = `
"function anonymous(bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, component } = bdom;
  let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
  
  return function template(ctx, node, key = \\"\\") {
    return component(\`ComponentC\`, {}, key + \`__1\`, node, ctx);
  }
}"
`;

exports[`basics top level sub widget with a parent 3`] = `
"function anonymous(bdom, helpers
) {
  let { text, createBlock, list, multi, html, toggler, component } = bdom;
  let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
  
  let block1 = createBlock(\`<div><block-child-0/></div>\`);
  
  return function template(ctx, node, key = \\"\\") {
    let b2 = component(\`ComponentB\`, {}, key + \`__1\`, node, ctx);
    return block1([], [b2]);
  }
}"
`;
