@extends('layouts.app') @section('title', $store->name . ' — Marketplace') @php $isImgUrl = fn($v) => $v && \Illuminate\Support\Str::startsWith($v, ['http','/','data:']); @endphp @section('content')
@if ($store->bannerUrl())
@endif
← Marketplace

{{ $store->name }}

@if($store->description)

{{ $store->description }}

@endif

Royalti kreator {{ $store->royalty_percent }}% · Ganti warna & pesan via editor

@if ($designs->count())
@foreach ($designs as $design) @php $colors = collect($design->product?->colors ?: [['name' => 'Default', 'hex' => '#e5e7eb']])->values(); $price = ($design->product?->priceForScale(100) ?? 0) + (int) ($design->sale_price ?? 0); $editorUrl = $design->product ? route('editor.show', ['product' => $design->product, 'template' => $design->id]) : null; $mockups = $colors->mapWithKeys(fn ($c) => [$c['name'] => $design->product?->mockupSvg($c['hex'] ?? '#e5e7eb')])->all(); @endphp
@if ($isImgUrl($design->preview_data)) @endif

{{ $design->name }}

{{ $design->product->name ?? '' }}

@rupiah($price)

Warna ·

@foreach ($colors as $c) @endforeach
@if ($editorUrl) Ganti warna @endif
@csrf
@endforeach
{{ $designs->links() }}
@else
Toko ini belum memiliki desain yang disetujui.
@endif
@endsection