[gd_scene load_steps=20 format=3 uid="uid://ctam0fxigbefk"]

[ext_resource type="FontFile" uid="uid://do40418waa8w3" path="res://assets/fonts/Inter-Regular.otf" id="1_ruyeb"]
[ext_resource type="Script" path="res://scripts/ui/search.gd" id="2_7qvyv"]
[ext_resource type="Resource" uid="uid://b1xvdym0qh6td" path="res://resources/gate_events.res" id="3_685a6"]
[ext_resource type="Script" path="res://scripts/ui/search/search_status.gd" id="4_cx4ue"]
[ext_resource type="Texture2D" uid="uid://byrcelmfy6r3l" path="res://assets/textures/search.svg" id="5_c6ql8"]
[ext_resource type="Texture2D" uid="uid://cx3xxaqo3s3eq" path="res://assets/textures/gate.svg" id="6_p0kxs"]
[ext_resource type="Script" path="res://scripts/ui/search/download_animation.gd" id="7_x8glc"]
[ext_resource type="Texture2D" uid="uid://cli88m5w3op6l" path="res://assets/textures/close_tab.svg" id="8_c6y7s"]
[ext_resource type="Script" path="res://scripts/ui/menu/star.gd" id="9_ddnf2"]
[ext_resource type="Resource" uid="uid://bewhdj6jugt6q" path="res://resources/bookmarks.tres" id="10_ih0xb"]
[ext_resource type="Texture2D" uid="uid://c7ljriip50hte" path="res://assets/textures/star.svg" id="11_36jkj"]
[ext_resource type="Texture2D" uid="uid://itloduvrh00o" path="res://assets/textures/star_color.svg" id="12_fj18v"]
[ext_resource type="Script" path="res://scripts/ui/search/prompt_navigation.gd" id="13_2wt6m"]
[ext_resource type="Script" path="res://scripts/ui/search/fix_promt_position.gd" id="14_t74qb"]
[ext_resource type="Script" path="res://scripts/ui/search/prompt_results.gd" id="15_oxssj"]
[ext_resource type="Resource" uid="uid://cjcdum6fm4ta0" path="res://resources/api_settings.tres" id="16_rk35h"]
[ext_resource type="PackedScene" uid="uid://b57n6cvtqn5b7" path="res://scenes/components/search/prompt.tscn" id="17_xggpn"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hyysn"]
content_margin_left = 30.0
content_margin_top = 3.0
content_margin_right = 30.0
bg_color = Color(0.0862745, 0.0901961, 0.117647, 1)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.0823529, 0.0823529, 0.105882, 1)
border_blend = true
corner_radius_top_left = 15
corner_radius_top_right = 15
corner_radius_bottom_right = 15
corner_radius_bottom_left = 15
corner_detail = 10

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_mh73y"]
bg_color = Color(0.0862745, 0.0901961, 0.117647, 1)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.0823529, 0.0823529, 0.105882, 1)
border_blend = true
corner_radius_top_left = 15
corner_radius_top_right = 15
corner_radius_bottom_right = 15
corner_radius_bottom_left = 15
corner_detail = 10

[node name="Search" type="LineEdit" node_paths=PackedStringArray("prompt_panel")]
auto_translate_mode = 2
anchors_preset = 14
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_top = -16.5
offset_bottom = 15.5
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
localize_numeral_system = false
focus_next = NodePath("Prompt")
focus_mode = 1
theme_override_colors/selection_color = Color(0.419608, 0.231373, 0.929412, 0.588235)
theme_override_colors/font_placeholder_color = Color(0.431373, 0.435294, 0.494118, 1)
theme_override_colors/font_color = Color(0.831373, 0.831373, 0.831373, 1)
theme_override_fonts/font = ExtResource("1_ruyeb")
theme_override_font_sizes/font_size = 15
theme_override_styles/focus = SubResource("StyleBoxFlat_hyysn")
theme_override_styles/normal = SubResource("StyleBoxFlat_hyysn")
placeholder_text = "Search or type URL"
select_all_on_focus = true
script = ExtResource("2_7qvyv")
gate_events = ExtResource("3_685a6")
prompt_panel = NodePath("Prompt/Panel")

[node name="SearchStatus" type="Control" parent="." node_paths=PackedStringArray("search_line_edit", "search", "downloading", "success", "error")]
modulate = Color(0.431373, 0.435294, 0.494118, 1)
layout_mode = 1
anchors_preset = 4
anchor_top = 0.5
anchor_bottom = 0.5
offset_left = 10.0
offset_top = -7.0
offset_right = 24.0
offset_bottom = 7.0
grow_vertical = 2
mouse_filter = 1
script = ExtResource("4_cx4ue")
gate_events = ExtResource("3_685a6")
search_line_edit = NodePath("..")
search = NodePath("Search")
downloading = NodePath("Downloading")
success = NodePath("Success")
error = NodePath("Error")
white = Color(0.831373, 0.831373, 0.831373, 1)
gray = Color(0.431373, 0.435294, 0.494118, 1)

[node name="Search" type="TextureRect" parent="SearchStatus"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("5_c6ql8")
expand_mode = 1

[node name="Downloading" type="TextureRect" parent="SearchStatus"]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
pivot_offset = Vector2(8, 8)
texture = ExtResource("6_p0kxs")
expand_mode = 1
script = ExtResource("7_x8glc")
start_scale = 1.0
end_scale = 0.5
duration = 0.5

[node name="Success" type="TextureRect" parent="SearchStatus"]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("6_p0kxs")
expand_mode = 1

[node name="Error" type="TextureRect" parent="SearchStatus"]
visible = false
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("8_c6y7s")
expand_mode = 1

[node name="Bookmark" type="Control" parent="." node_paths=PackedStringArray("star", "unstar")]
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -28.0
offset_top = -10.0
offset_right = -8.0
offset_bottom = 10.0
grow_horizontal = 0
grow_vertical = 2
script = ExtResource("9_ddnf2")
gate_events = ExtResource("3_685a6")
bookmarks = ExtResource("10_ih0xb")
star = NodePath("Star")
unstar = NodePath("Unstar")

[node name="Star" type="BaseButton" parent="Bookmark"]
_import_path = NodePath("")
unique_name_in_owner = false
process_mode = 0
process_priority = 0
process_physics_priority = 0
process_thread_group = 0
physics_interpolation_mode = 2
auto_translate_mode = 1
editor_description = ""
visible = false
modulate = Color(1, 1, 1, 1)
self_modulate = Color(1, 1, 1, 1)
show_behind_parent = false
top_level = false
clip_children = 0
light_mask = 1
visibility_layer = 1
z_index = 0
z_as_relative = true
y_sort_enabled = false
texture_filter = 0
texture_repeat = 0
material = null
use_parent_material = false
clip_contents = false
custom_minimum_size = Vector2(0, 0)
layout_direction = 0
layout_mode = 1
anchors_preset = 15
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 0.0
offset_top = 0.0
offset_right = 0.0
offset_bottom = 0.0
grow_horizontal = 2
grow_vertical = 2
rotation = 0.0
scale = Vector2(1, 1)
pivot_offset = Vector2(0, 0)
size_flags_horizontal = 1
size_flags_vertical = 1
size_flags_stretch_ratio = 1.0
localize_numeral_system = true
tooltip_text = ""
focus_neighbor_left = NodePath("")
focus_neighbor_top = NodePath("")
focus_neighbor_right = NodePath("")
focus_neighbor_bottom = NodePath("")
focus_next = NodePath("")
focus_previous = NodePath("")
focus_mode = 2
mouse_filter = 0
mouse_force_pass_scroll_events = true
mouse_default_cursor_shape = 2
theme = null
theme_type_variation = &""
disabled = false
toggle_mode = false
button_pressed = false
action_mode = 1
button_mask = 1
keep_pressed_outside = false
button_group = null
shortcut = null
shortcut_feedback = true
shortcut_in_tooltip = true
script = null

[node name="TextureRect" type="TextureRect" parent="Bookmark/Star"]
self_modulate = Color(0.831373, 0.831373, 0.831373, 1)
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("11_36jkj")
expand_mode = 1

[node name="Unstar" type="BaseButton" parent="Bookmark"]
_import_path = NodePath("")
unique_name_in_owner = false
process_mode = 0
process_priority = 0
process_physics_priority = 0
process_thread_group = 0
physics_interpolation_mode = 2
auto_translate_mode = 1
editor_description = ""
visible = true
modulate = Color(1, 1, 1, 1)
self_modulate = Color(1, 1, 1, 1)
show_behind_parent = false
top_level = false
clip_children = 0
light_mask = 1
visibility_layer = 1
z_index = 0
z_as_relative = true
y_sort_enabled = false
texture_filter = 0
texture_repeat = 0
material = null
use_parent_material = false
clip_contents = false
custom_minimum_size = Vector2(0, 0)
layout_direction = 0
layout_mode = 1
anchors_preset = 15
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 0.0
offset_top = 0.0
offset_right = 0.0
offset_bottom = 0.0
grow_horizontal = 2
grow_vertical = 2
rotation = 0.0
scale = Vector2(1, 1)
pivot_offset = Vector2(0, 0)
size_flags_horizontal = 1
size_flags_vertical = 1
size_flags_stretch_ratio = 1.0
localize_numeral_system = true
tooltip_text = ""
focus_neighbor_left = NodePath("")
focus_neighbor_top = NodePath("")
focus_neighbor_right = NodePath("")
focus_neighbor_bottom = NodePath("")
focus_next = NodePath("")
focus_previous = NodePath("")
focus_mode = 2
mouse_filter = 0
mouse_force_pass_scroll_events = true
mouse_default_cursor_shape = 2
theme = null
theme_type_variation = &""
disabled = false
toggle_mode = false
button_pressed = false
action_mode = 1
button_mask = 1
keep_pressed_outside = false
button_group = null
shortcut = null
shortcut_feedback = true
shortcut_in_tooltip = true
script = null

[node name="TextureRect" type="TextureRect" parent="Bookmark/Unstar"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("12_fj18v")
expand_mode = 1

[node name="Prompt" type="Control" parent="." node_paths=PackedStringArray("search", "prompt_results")]
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
grow_vertical = 0
script = ExtResource("13_2wt6m")
search = NodePath("..")
prompt_results = NodePath("Panel/VBoxContainer")

[node name="Panel" type="Panel" parent="Prompt" node_paths=PackedStringArray("search")]
visible = false
top_level = true
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -500.0
offset_top = 560.0
offset_right = 500.0
offset_bottom = 860.0
grow_horizontal = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_mh73y")
script = ExtResource("14_t74qb")
search = NodePath("../..")

[node name="VBoxContainer" type="VBoxContainer" parent="Prompt/Panel" node_paths=PackedStringArray("panel")]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/separation = 0
script = ExtResource("15_oxssj")
gate_events = ExtResource("3_685a6")
api = ExtResource("16_rk35h")
result_scene = ExtResource("17_xggpn")
panel = NodePath("..")

[connection signal="text_changed" from="." to="Prompt/Panel/VBoxContainer" method="_on_search_text_changed"]
[connection signal="text_submitted" from="." to="." method="_on_text_submitted"]
[connection signal="pressed" from="Bookmark/Star" to="Bookmark" method="_on_star_pressed"]
[connection signal="pressed" from="Bookmark/Unstar" to="Bookmark" method="_on_unstar_pressed"]
