File size: 1,879 Bytes
5f5d58c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
const Example_svelte_svelte_type_style_lang = '';

/* home/runner/work/gradio/gradio/js/radio/Example.svelte generated by Svelte v4.2.2 */
const {
	SvelteComponent,
	append,
	attr,
	detach,
	element,
	init,
	insert,
	noop,
	safe_not_equal,
	set_data,
	text,
	toggle_class
} = window.__gradio__svelte__internal;
function create_fragment(ctx) {
	let div;
	let t;

	return {
		c() {
			div = element("div");
			t = text(/*value*/ ctx[0]);
			attr(div, "class", "svelte-1ayixqk");
			toggle_class(div, "table", /*type*/ ctx[1] === "table");
			toggle_class(div, "gallery", /*type*/ ctx[1] === "gallery");
			toggle_class(div, "selected", /*selected*/ ctx[2]);
		},
		m(target, anchor) {
			insert(target, div, anchor);
			append(div, t);
		},
		p(ctx, [dirty]) {
			if (dirty & /*value*/ 1) set_data(t, /*value*/ ctx[0]);

			if (dirty & /*type*/ 2) {
				toggle_class(div, "table", /*type*/ ctx[1] === "table");
			}

			if (dirty & /*type*/ 2) {
				toggle_class(div, "gallery", /*type*/ ctx[1] === "gallery");
			}

			if (dirty & /*selected*/ 4) {
				toggle_class(div, "selected", /*selected*/ ctx[2]);
			}
		},
		i: noop,
		o: noop,
		d(detaching) {
			if (detaching) {
				detach(div);
			}
		}
	};
}

function instance($$self, $$props, $$invalidate) {
	let { value } = $$props;
	let { type } = $$props;
	let { selected = false } = $$props;

	$$self.$$set = $$props => {
		if ('value' in $$props) $$invalidate(0, value = $$props.value);
		if ('type' in $$props) $$invalidate(1, type = $$props.type);
		if ('selected' in $$props) $$invalidate(2, selected = $$props.selected);
	};

	return [value, type, selected];
}

class Example extends SvelteComponent {
	constructor(options) {
		super();
		init(this, options, instance, create_fragment, safe_not_equal, { value: 0, type: 1, selected: 2 });
	}
}

export { Example as default };
//# sourceMappingURL=Example-0b753ad4.js.map