import"./svelte/svelte_internal_flags_legacy.js";import"./svelte/svelte_internal_flags_async.js";import*as e from"./svelte/svelte_internal_client.js";import{onMount as y}from"./svelte/svelte_svelte.js";var g=e.from_html("<div> </div>");function z(f,s){e.push(s,!1);let a=e.prop(s,"value",12),u=e.prop(s,"type",12),n=e.prop(s,"selected",12,!1),c=e.mutable_source(),i=e.mutable_source();function d(t,r){t.style.setProperty("--local-text-width",`${r&&r<150?r:200}px`),t.style.whiteSpace="unset"}function v(t,r=60){if(!t)return"";const o=String(t);return o.length<=r?o:o.slice(0,r)+"..."}y(()=>{d(e.get(i),e.get(c))});var m={get value(){return a()},set value(t){a(t),e.flush()},get type(){return u()},set type(t){u(t),e.flush()},get selected(){return n()},set selected(t){n(t),e.flush()}};e.init();var l=g();let p;var _=e.child(l,!0);return e.reset(l),e.bind_this(l,t=>e.set(i,t),()=>e.get(i)),e.template_effect(t=>{p=e.set_class(l,1,"svelte-xxobeb",null,p,{table:u()==="table",gallery:u()==="gallery",selected:n()}),e.set_text(_,t)},[()=>(e.deep_read_state(a()),e.untrack(()=>v(a())))]),e.bind_element_size(l,"clientWidth",t=>e.set(c,t)),e.append(f,l),e.pop(m)}export{z as default};
